Hi there,
You may find the following code helpful:
The code should be inserted into the VBA code module of the worksheet in question (not into a standard VBA code module).
All of the parameters (i.e. Range, Colours etc.) are defined as constants at the top of the module, and can easily be tweaked if necessary. The background colours are defined as COLOR values rather than COLORINDEX values (just in case you're not using the standard colour palette).
You don't mention whether or not the cells may contain values other than those you've defined as needing to be highlighted, but in any event, the "Case Else" condition caters for the situation where the value of a cell changes from (e.g.) S to a value not included in your list. In such a case, the cell background colour will change from Red to no colour (clear).
Hope this helps - please let me know how you get on.
Regards,
Greg M
Bookmarks