Livin404
Well-known Member
- Joined
- Jan 7, 2019
- Messages
- 774
- Office Version
- 365
- 2019
- Platform
- Windows
Hello, I havea basic macro and it does work; however, I need to use a wilde card "*" and it doesn't work. After DEP and ARR I need a wild card. In Column one it will always begin with a DEP or ARR. Lastly I would like those colors to extend through Column F.
My macro is:
My macro is:
VBA Code:
Sub Local_BACKGROUND()
Sheets("Schedule").Select
endrow = Range("A" & Rows.count).End(xlUp).Row
For Each cell In Range("A1:A" & endrow)
Select Case cell.Value
Case "DEP"
Range(Cells(cell.Row, "A"), Cells(cell.Row, "A")).Interior.ColorIndex = 35
Case "ARR"
Range(Cells(cell.Row, "A"), Cells(cell.Row, "A")).Interior.ColorIndex = 22
End Select
Next cell
End Sub