|
Hello,
here is a solution in a kit form. Dare ask if you need more help. Ivan Use a "For Each...Next" loop : Dim MyCell As Range, MyRange As Range
Set MyRange = Range("C3:C450")
For Each MyCell In MyRange
'instructions
Next MyCell
The "if" statement would be : If MyCell.Value <> Range("B1").Value Then
'instructions
End If
Then, to hide a row, have a look at "Range.EntireRow" and "Range.Hidden" in the help file. To make your code run faster, think of using "Application.ScreenUpdating" (see help file) If you want your macro to run automatically when you change the selection in B1, see the help file about the events of a worksheet. |
Résultats pour Simple If else Loop with hide row
Résultats pour Simple If else Loop with hide row
Résultats pour Simple If else Loop with hide row
Résultats pour Simple If else Loop with hide row
Résultats pour Simple If else Loop with hide row
Résultats pour Simple If else Loop with hide row