Should be fairly simple (think I'm just having a brain fart) - I want to hide/unhide certain rows based on cells values in another table (and I'd iterate through this table) to hide/unhide throughout the document.
Cells(2,y) is the starting row, Cells(3,y) is the ending row - I want to hide all rows between those two values (eg Cells(2,y) = 10, Cells (3,y) = 20, hide rows 10-20).
Just missing something obvious in the bolded row.
For x = 4 To 10
For y = 6 To 10
If Sheets("Data").Cells(x, y) = "X" Then
Rows(Cells(2, y),Cells(3,y)).EntireRow.Hidden = True
End If
Next y
Next x
Cells(2,y) is the starting row, Cells(3,y) is the ending row - I want to hide all rows between those two values (eg Cells(2,y) = 10, Cells (3,y) = 20, hide rows 10-20).
Just missing something obvious in the bolded row.
For x = 4 To 10
For y = 6 To 10
If Sheets("Data").Cells(x, y) = "X" Then
Rows(Cells(2, y),Cells(3,y)).EntireRow.Hidden = True
End If
Next y
Next x