R
RyGuy
I have a range of cells, with time in half-hour increments. I would like to
hide all rows with a :30 in Range A. I put together this macro, but it
doesn’t actually do anything. What am I missing?
Sub HideRows()
Dim cell As Range
Application.ScreenUpdating = False
If tgButton = True Then
For Each cell In Range("A5:A20000")
If cell.Value Like ":30" Then
cell.EntireRow.Hidden = True
End If
Next cell
Else
Range("A5:A20000").Rows.EntireRow.Hidden = False
End If
Application.ScreenUpdating = False
End Sub
Here is some sample data:
12:30:00 AM
1:00:00 AM
1:30:00 AM
2:00:00 AM
Thanks,
Ryan---
hide all rows with a :30 in Range A. I put together this macro, but it
doesn’t actually do anything. What am I missing?
Sub HideRows()
Dim cell As Range
Application.ScreenUpdating = False
If tgButton = True Then
For Each cell In Range("A5:A20000")
If cell.Value Like ":30" Then
cell.EntireRow.Hidden = True
End If
Next cell
Else
Range("A5:A20000").Rows.EntireRow.Hidden = False
End If
Application.ScreenUpdating = False
End Sub
Here is some sample data:
12:30:00 AM
1:00:00 AM
1:30:00 AM
2:00:00 AM
Thanks,
Ryan---