Hello, I am using a loop function to select a range of rows with x marked in two columns, i.e. with two conditions. I have tried many different things putting an And function but noting works. I highly appreciate if anyone can advise
Code:
If ActiveSheet.ToggleButton1 = True Then
For Each c1 In Range(Cells(StartR, 2), Cells(StartR + Size - 1, 2)) And For Each c1 In Range(Cells(StartR, 2), Cells(StartR + Size - 1, 2))
If c1.Value = "x" Then
c1.EntireRow.Hidden = False
If Rng Is Nothing Then Set Rng = c1 Else Set Rng = Union(Rng, c1)
End If
Next c1