Bonsoir à tous,
Avec la macro suivante je cherche à pouvoir supprimer un ensemble de lignes, suivant la valeur de "C9"
Sub sup_ligne_projet()
Dim Rg As Range
With Sheets("POP")
Set Rg = .Range("C15:C" & .Range("C65536").End(xlUp).Row)
End With
For a = Rg.Rows.Count To 1 Step -1
If Application.CountIf(Rg(a).EntireRow, "C9") > 0 Then
Rg(a).EntireRow.Delete
End If
Next
End Sub
j'arrive a faire tourné la macro, si je remplace "C9" par une valeur Fixe.
If Application.CountIf(Rg(a).EntireRow, "C9") > 0 Then
par
If Application.CountIf(Rg(a).EntireRow, "1111") > 0 Then
Mais, mon but est de profiter de la recherche, pour pouvoir suprimer toutes les lignes d'un même "projet" (projet fini par ex.)
Merci d'avance et bonne nuit à tous.