vadelacaisse
Nouveau membre
Bonjour
J'ai lu le sujet pourtant vaste sur ce thème et cela ne marche pas
J'ai un champ (A3:K2000) et je souhaite afficher seulement les lignes dont une cellule contient un mot saisi en D1.
Je lance la macro : il se passe des choses mais affichage non modifié...
J'ai réussi à faire la macro pour tout réafficher... C'est déjà cela
Inutile de préciser qu'en VBA je suis au niveau CP
J'ai fait pas mal d'essais dont certains sont en commentaires
Merci d'une aide compréhensible par un béotien
[cpp]
Dim plage As Range
Dim Cell As Range
Set plage = Range("A3:K2000") '.End(xlUp)
'Set plage = Range("A3:K" & Range("k2000").End(xlUp).Row)
'Set plage = Range(Cells(3, 1), Cells(2000, 11).End(xlUp).Row)
'Application.ScreenUpdating = False
'Rows.Hidden = True
For Each Cell In plage
If InStr(LCase(Cell.Text), LCase("D1")) Then
'If InStr(Cells.Text, Range("Location").Text) Then
Cell.EntireRow.Hidden = False
End If
Next
'Application.ScreenUpdating = True
End Sub
[/cpp]
J'ai lu le sujet pourtant vaste sur ce thème et cela ne marche pas
J'ai un champ (A3:K2000) et je souhaite afficher seulement les lignes dont une cellule contient un mot saisi en D1.
Je lance la macro : il se passe des choses mais affichage non modifié...
J'ai réussi à faire la macro pour tout réafficher... C'est déjà cela
Inutile de préciser qu'en VBA je suis au niveau CP
J'ai fait pas mal d'essais dont certains sont en commentaires
Merci d'une aide compréhensible par un béotien
[cpp]
Dim plage As Range
Dim Cell As Range
Set plage = Range("A3:K2000") '.End(xlUp)
'Set plage = Range("A3:K" & Range("k2000").End(xlUp).Row)
'Set plage = Range(Cells(3, 1), Cells(2000, 11).End(xlUp).Row)
'Application.ScreenUpdating = False
'Rows.Hidden = True
For Each Cell In plage
If InStr(LCase(Cell.Text), LCase("D1")) Then
'If InStr(Cells.Text, Range("Location").Text) Then
Cell.EntireRow.Hidden = False
End If
Next
'Application.ScreenUpdating = True
End Sub
[/cpp]