Sub Supprimer_Mais_Garder_Formules()
Call PourTest
[A1].CurrentRegion.Select
MsgBox "Effacer valeurs seules et garder les formules ?", vbQuestion + vbOKOnly, "Test"
Selection.SpecialCells(xlCellTypeConstants, 23).ClearContents '-< proposition initiale
End Sub
Private Sub PourTest()
Range("A1:F3") = "=ADDRESS(ROW(),COLUMN(),4)"
Range("A4:F6") = "=ROW()*COLUMN()"
Range("A7:F9") = "=ROW()/0"
Range("A10:F10") = Application.UserName
Range("A1:F3") = Range("A1:F3").Value
Range("A8:F8") = Range("A8:F8").Value
Range("A1:F3,A8:F8").Interior.Color = vbYellow
End Sub