Pharmacisticus
New Member
- Joined
- Sep 12, 2018
- Messages
- 13
Hi looking for help with following macros;
Sub HURows()
BeginRow = 1
EndRow = 100
ChkCol = 3
For RowCnt = BeginRow To EndRow
If Cells(RowCnt, ChkCol).Value < 5 Then
Cells(RowCnt, ChkCol).EntireRow.Hidden = True
Else
Cells(RowCnt, ChkCol).EntireRow.Hidden = False
End If
Next RowCnt End Sub
This is great for hiding the rows for a single column but I'm looking for one that can do a couple of columns...
i.e. column 3 = 0, column 4 = 0 hide the row
.... column 3 = 0, column 4 = 6 don't hide the row
Can this be done, and also done with additional rows?
Cheers,
Josh
Sub HURows()
BeginRow = 1
EndRow = 100
ChkCol = 3
For RowCnt = BeginRow To EndRow
If Cells(RowCnt, ChkCol).Value < 5 Then
Cells(RowCnt, ChkCol).EntireRow.Hidden = True
Else
Cells(RowCnt, ChkCol).EntireRow.Hidden = False
End If
Next RowCnt End Sub
This is great for hiding the rows for a single column but I'm looking for one that can do a couple of columns...
i.e. column 3 = 0, column 4 = 0 hide the row
.... column 3 = 0, column 4 = 6 don't hide the row
Can this be done, and also done with additional rows?
Cheers,
Josh