This will work:
Depending on how many worksheets and cells you have though, this may take a long time to run.Code:Sub ColorMe()Dim ws As Worksheet Dim cl As Range For Each ws In ActiveWorkbook.Worksheets For Each cl In ws.UsedRange Select Case cl.Value Case Is = "MEDIUM" cl.Interior.ColorIndex = 3 Case Else 'Keep adding "Case Is = " statements for each "ElseIf" 'This section is what to do if the cell does not meet 'your criteria End Select Next cl Next ws End Sub
Curious, why use a macro instead of using conditional formatting? It's built for this task and then only works on the cells that are of interest...
Bookmarks