dcwinter
Board Regular
- Joined
- Aug 10, 2007
- Messages
- 118
Hi everyone!
It's been a while since I did a lot on Excel so I'm rusty again. I have the following code which I thought was sufficent, but for some reason it is not deleting the hidden rows. Can anyone spot any issues? (I've shortened the code because of repetition):
Any help, as ever, greatly appreciated!
DC
It's been a while since I did a lot on Excel so I'm rusty again. I have the following code which I thought was sufficent, but for some reason it is not deleting the hidden rows. Can anyone spot any issues? (I've shortened the code because of repetition):
Code:
Sub Macro9()
Sheets("Footfall raw data").Select
Range("E1").Select
Dim myRng As Range
Set myRng = Range("E1", Range("E5000").End(xlUp))
Application.ScreenUpdating = False
For Each c In myRng
If c.Value = " Card/ID Reset" Then c.EntireRow.Hidden = True
Next c
For Each c In myRng
If c.Value = " Clock In/Out" Then c.EntireRow.Hidden = True
Next c
...
For i = 1 To [A65536].End(xlUp).Row
If Rows(i).Hidden = True Then
Rows(i).EntireRow.Delete
i = i - 1
End If
Next i
End Sub
Any help, as ever, greatly appreciated!
DC