Ça doit ressembler à qq chose comme ça :
Code:
1 2 3 4 5 6 7
| Dim MyRange As Range
Dim L As Long
Set MyRange = ActiveWorkbook.Worksheets("Feuil1").Range("A:A")
L = MyRange.Find(Me.ListBox1_Noms).Row
Me.Tag = L
ActiveWorkbook.Worksheets("Feuil1").Range("j" & L & ":z" & L).clear
AND |
Je ne connais pas le cellules que tu veux efface A,B,C ?
Code:
ActiveWorkbook.Worksheets("Feuil1").Range("PremiereCell" & L & ":DerrièreCell" & L).clear
je veux effacer uniquement les cellules où il n'y a pas de formule
Code:
1 2 3 4 5 6 7 8 9
| Dim MyRange As Range
Dim L As Long
Dim C As Long
Set MyRange = ActiveWorkbook.Worksheets("Feuil1").Range("A:A")
L = MyRange.Find(Me.ListBox1_Noms).Row
Set MyRange = ActiveWorkbook.Worksheets("Feuil1").Range("A" & L & ":IV" & L)
For C = 1 To MyRange.Count
If Left(MyRange(C).FormulaR1C1 & " ", 1) <> "=" Then MyRange(C) = ""
Next |