Hi there
I have the below code to hide rows in spreadsheet. At the moment the loop stops when the cell is empty.
However, is there a way to amend the code to stop the loop when the cell color is green?
Sub HideRows()
Range("A3").Select
Do
If ActiveCell = "WRONG" Then
Selection.EntireRow.Hidden = True
ActiveCell.Offset(1, 0).Select
Else
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell)
End Sub
I have the below code to hide rows in spreadsheet. At the moment the loop stops when the cell is empty.
However, is there a way to amend the code to stop the loop when the cell color is green?
Sub HideRows()
Range("A3").Select
Do
If ActiveCell = "WRONG" Then
Selection.EntireRow.Hidden = True
ActiveCell.Offset(1, 0).Select
Else
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell)
End Sub