Bolter LAC
Board Regular
- Joined
- Aug 13, 2008
- Messages
- 140
Hello again.
I have a macro button that when activated deletes all rows with a blank cell in column 'A'. I now want insert new columns and change the macro to delete rows with blank cells to columns 'A' through to 'F'. I have tried to alter the range in the below macro but when I activate the button the macro deletes everything below A6. Any help appreciated.
Sub HideRows()
Range("a6:a600").EntireRow.Hidden = False
On Error Resume Next
Set Rng = Range("a6:a600").SpecialCells(xlBlanks)
On Error GoTo 0
If Not Rng Is Nothing Then
Rng.EntireRow.Hidden = True
End If
End Sub
Thanks
Bolter LAC
I have a macro button that when activated deletes all rows with a blank cell in column 'A'. I now want insert new columns and change the macro to delete rows with blank cells to columns 'A' through to 'F'. I have tried to alter the range in the below macro but when I activate the button the macro deletes everything below A6. Any help appreciated.
Sub HideRows()
Range("a6:a600").EntireRow.Hidden = False
On Error Resume Next
Set Rng = Range("a6:a600").SpecialCells(xlBlanks)
On Error GoTo 0
If Not Rng Is Nothing Then
Rng.EntireRow.Hidden = True
End If
End Sub
Thanks
Bolter LAC