fry
Active Member
- Joined
- Apr 25, 2007
- Messages
- 411
Hi All
I'm struggling with this. I found this code that seemed to be what I want but when I ran it, it did absolutely nothing?????
I have an increasing number of rows that are normally formatted unless a value is entered in a particular cell, in which case the whole row is formatted in a different colour. I need a bit of code that will hide all the rows in that colour....
Anyone like to help with this???
I'm struggling with this. I found this code that seemed to be what I want but when I ran it, it did absolutely nothing?????
Code:
Sub test()
Dim LR As Long 'Last Row
Dim RN As Integer 'Row Number
LR = Cells(Rows.Count, "J").End(xlUp).Row
Application.ScreenUpdating = False
For RN = 1 To LR
If Cells(RN, "J").Interior.ColorIndex = 37 Then Cells(RN, "J").EntireRow.Hidden = True
Next RN
Application.ScreenUpdating = True
End Sub
I have an increasing number of rows that are normally formatted unless a value is entered in a particular cell, in which case the whole row is formatted in a different colour. I need a bit of code that will hide all the rows in that colour....
Anyone like to help with this???