Hi All
I have a macro below to change the conditional format of the value in column B, however I need to extend it to include column E, G, H and J as well. Please could anyone help how should I update the macro below:
I have a macro below to change the conditional format of the value in column B, however I need to extend it to include column E, G, H and J as well. Please could anyone help how should I update the macro below:
VBA Code:
Private Sub IconSet()
Dim x As Long, lastRow As Long
lastRow = Cells(Rows.Count, "A").End(xlUp).row
For x = lastRow To 2 Step -1
If Cells(x, 2).Value = "Green" Then
Cells(x, 2).Value = "1"
End If
If Cells(x, 2).Value = "Amber" Then
Cells(x, 2).Value = "2"
End If
If Cells(x, 2).Value = "Red" Then
Cells(x, 2).Value = "3"
End If
Next x
End Sub