hello - originally i was trying to see if all cells in a row were empty then hide that row, but I was getting nowhere. Now I am trying to check just two cells, "A" and "E," and if they are empty then hide that row. here is what I have:
Sub hideBLANKRows()
Application.ScreenUpdating = False
Dim i, c1, c2 As Long
Dim Lastrow As Long
Lastrow = Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To Lastrow
c1 = Cells(i, "A")
c2 = Cells(i, "E")
If c1 = xlnull Then
If c2 = xlnull Then Rows(i).Hidden = True
Next
Application.ScreenUpdating = True
End Sub
Thanks for any help - Jim A
Sub hideBLANKRows()
Application.ScreenUpdating = False
Dim i, c1, c2 As Long
Dim Lastrow As Long
Lastrow = Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To Lastrow
c1 = Cells(i, "A")
c2 = Cells(i, "E")
If c1 = xlnull Then
If c2 = xlnull Then Rows(i).Hidden = True
Next
Application.ScreenUpdating = True
End Sub
Thanks for any help - Jim A
Last edited: