I'm trying to find a way to hide about 18 rows that equal zero in column A, its probably really simple but I can't think of how to do it.
-Brian
I'm trying to find a way to hide about 18 rows that equal zero in column A, its probably really simple but I can't think of how to do it.
-Brian
Use find or a filter to locate the zeros. Then when you know what row you want to hide use
r.EntireRow.Hidden = True
where r is the range with the zero.
Try this
Sub Macro2()
'
' FIND THE END OF THE FILE
' SEARCH FOR ANY ENTRY, BY SEARCHING BACKWARDS BY ROWS
'
If WorksheetFunction.CountA(Cells) > 0 Then
LastRow_length = Cells.Find(What:="*", after:=[A1], _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious).Row
End If
'
For i = 1 To LastRow_length
If Cells(i, 1).Value = "0" Then
Cells(i, 1).Select
Selection.EntireRow.Hidden = True
End If
Next i
End Sub
thank you for your help it all worked out I'm sure I'll be back with another question soon, thanks again.
-Brian
Don’t have an account yet? Register yourself now and be a part of our community!