De nouveau un problème avec une boucle, (les premières sont toujours difficiles, il parait, lol) :
Je cherche à masquer une ligne si la colonne A de cette même ligne contient 'X'.
Voici mon code (erroné sans aucun doute)
Code:
Sub masquer()
Dim tablo As Range
Dim C As Range
Set tablo = Columns('A')
For Each C In tablo
If C.Value = 'X' Then Rows('C:C').Select
Selection.EntireRow.Hidden = True
Next C
End Sub
essaye ce code :
Sub masquer()
Dim cell As Range
Dim C
For Each cell In Range('A1:A' & Range('A65536').End(xlUp).Row)
If cell.Value = 'X' Then
Range(cell.Address).EntireRow.Hidden = True
End If
Next cell
End Sub