Hi Friends,
I wanted to hide the rows if all the columns from C:R is = to zero but i also wanted to start this macro from row 20 and going forward.
Please see code below and let me know what's wrong. Thanks, Excel forum rocks.
Public Sub Hiderows()
Dim LRow As Integer
Dim i As Integer
LRow = Cells(Rows.Count, 1).End(xlUp).Row
For i = 1 To LRow
If Cells(i, "B") = 0 And Cells(i, "C") = 0 And Cells(i, "D") = 0 And Cells(i, "E") = 0 And Cells(i, "F") = 0 And Cells(i, "GC") = 0 And Cells(i, "H") = 0 And Cells(i, "I") = 0 And Cells(i, "J") = 0 And Cells(i, "K") = 0 And Cells(i, "L") = 0 And Cells(i, "M") = 0 And Cells(i, "N") = 0 And Cells(i, "O") = 0 And Cells(i, "P") = 0 And Cells(i, "Q") = 0 And Cells(i, "R") = 0 And Cells(i, "S") = 0 Then
Rows(i).EntireRow.Hidden = True
End If
Next
End Sub
Bookmarks