Private Sub CheckBox1_Click()
If CheckBox1.Value = True Then
i = 13
While Cells(i, 2).Value <> ""
If Cells(i, 4).Value = "X" Then
Rows(i).EntireRow.Hidden = True
End If
i = i + 1
Wend
Else
Cells.EntireRow.Hidden = False
End If
End Sub
"i = 13" |
Start row is row 13 |
"while cells i,2" |
searching in row 13 ("i") and column B ("2") after parameter. recommended is for this function to use the same parameter from "if cells" |
"if cells(i;4)" |
searching parameter "X" in row D13 |