steveo0707
Board Regular
- Joined
- Mar 4, 2013
- Messages
- 85
- Office Version
- 365
- 2019
- Platform
- Windows
The following is the code I have written for my worksheet. I am getting the program to do everything except for the last Case Parameters. It's not putting the © in the F column nor shading the cell green. I have also already tried making it an If statement and that did not work either.
VBA Code:
Sub Scanning()
Dim YELLOW As Variant
Dim OFF_GREEN As Variant
Dim GREEN As Variant
Dim Row As Long
' DEFINE THE COLORS
YELLOW = RGB(255, 255, 91)
OFF_GREEN = RGB(196, 215, 155)
GREEN = RGB(54, 248, 54)
' CYCLE THROUGH ROWS
Row = 1
Do Until Range("E" & Row).Value = VBA.Constants.vbNullString
' CHECKING COLUMN E
Select Case Range("E" & Row).Value
Case "Working On"
Range("A" & Row).Interior.Color = YELLOW
Case "In Box"
Range("A" & Row & ":B" & Row).Interior.Color = YELLOW
Case "Crate Built"
Range("F" & Row).Value = "©"
Range("F" & Row).Interior.Color = GREEN
End Select
' IF YOU ARE LOOKING FOR JUST A LETTER D IN COLUMN F
If Range("F" & Row).Value = "D" Then Range("C" & Row).Interior.Color = OFF_GREEN
Row = Row + 1
Loop
End Sub