I had a post for border color and I realize this one is similar, but I didn't realize that on my sheet because the user is zoomed out so far it is useless changing the border color property and linking a macro to it and it is much easier (user wise) to link it to the background color. The coding I have so far does a good job at recognizing the background color in the first box (boxes are 1 column wide and 5 rows long; there are 18 boxes per set) but it doesn't recognize the background colors in the the other boxes (or at least it doesn't link properly to the second part of my macro). The code I have so far is:
So what i'm trying to get it to do is to check the first cell in each box and if it has a red background then unhide specific rows in another sheet "Reports" that correspond to deficiency reports for that box. Each box represents a finished unit that is stored in my company's yard so it is important to have it unhide specific rows. All help is appreciated
Code:
Sub Butt*******83()
Dim rng1 As Range
Dim rng2 As Range
Dim B As Long
Set rng1 = Sheets("Layout").Range("C82:C87").Item(1, 1)
'first cell in the first box
Set rng2 = rng1.Offset(0, 2 * B)
'boxes occur every other column
For B = 0 To 17 '18 boxes
If rng2.Interior.Color = RGB(255, 0, 0) Then
'If cell has a red background
Sheets("Reports").Select
Range("A1:J35").Offset(35 * B, 0).EntireRow.Hidden = False
'Unhide specific rows in the "Reports" spreadsheet
Else
Sheets("Reports").Select
Range("A1:J35").Offset(35 * B, 0).EntireRow.Hidden = False
'Leave rows hidden or re-hide if unhidden
End If
Next B
End Sub
So what i'm trying to get it to do is to check the first cell in each box and if it has a red background then unhide specific rows in another sheet "Reports" that correspond to deficiency reports for that box. Each box represents a finished unit that is stored in my company's yard so it is important to have it unhide specific rows. All help is appreciated