Happy Friday!
I have this code that searches the range CalendarFloorsColumn for cells whose background color is red. It takes the data it finds in those cells and copies it to a column on another sheet called BoiseRequests.
What I need to do is have it copy additional data from columns B and D from the same row as the found red cells.
If there's a red cell in row 500 of the CalendarFloorsColumn range it would copy the data from that cell as well as the data from B500 and D500 to cell A1, A2 and A3 of the BoiseRequests sheet. The next red cell found would copy data to the next row down (B1, B2 and B3) on BoiseRequests and so on. make sense?
Here's my fabulous code...
I have this code that searches the range CalendarFloorsColumn for cells whose background color is red. It takes the data it finds in those cells and copies it to a column on another sheet called BoiseRequests.
What I need to do is have it copy additional data from columns B and D from the same row as the found red cells.
If there's a red cell in row 500 of the CalendarFloorsColumn range it would copy the data from that cell as well as the data from B500 and D500 to cell A1, A2 and A3 of the BoiseRequests sheet. The next red cell found would copy data to the next row down (B1, B2 and B3) on BoiseRequests and so on. make sense?
Here's my fabulous code...
VBA Code:
Sub BoiseRequests()
Dim MR As Excel.Range
Dim rngCell As Excel.Range
Dim rngCount As Long
Set MR = Sheets("Calendar").Range("CalendarFloorsColumn")
rngCount = 1
For Each rngCell In MR
If rngCell.DisplayFormat.Interior.Color = RGB(255, 0, 0) Then
Sheets("BoiseRequests").Range("A" & rngCount) = rngCell.Value
rngCount = rngCount + 1
End If
Next rngCell
End Sub