For up to 3 colors you would use Conditional Formatting,
no VBA code involved.
http://www.mvps.org/dmcritchie/excel/condfmt.htm
For more than 3 colors as I think you have, and specifically
because you asked for VBA see
http://www.mvps.org/dmcritchie/excel/event.htm#case
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages:
http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page:
http://www.mvps.org/dmcritchie/excel/search.htm
"Rob" wrote in message ...
Hi
I'm looking for a VBA script to colour all the cells in a row (or even just some in a row) a certain colour dependent on the value
in the 'A' column cell.
For instance, if cell A1 is Jan-03 then the whole row should be coloured light yellow (or whatever the RGB equivalent is); if cell
A2 is Feb-03 then the whole row should be coloured light green; and so on...
Is this possible?
Thanks for you help.
Rob