View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default date references in macros

Look at Format = Conditional Formatting

if you only have 3 conditions

Otherwise

For each cell in Selection
Select Case month(cell.Value)
Case 1 ' January
cell.Interior.ColorIndex = 5
Case 2 ' February
cell.Interior.ColorIndex = 3
Case 3 ' March
cell.Interior.ColorIndex = 4

.. . .

End Select
Next cell


--
Regards,
Tom Ogilvy


"blue49" wrote in message
...
I am trying to set some formatting perameters in a macro for a calendar. I
would like to base the formatting on month. For example, if the month is
January color all the day cells blue, if February red, etc.
I have only been able to get my macro to shade a range and it does it all

in
1 color. I am obviously using the wrong language/terms but I can't find

info
on how to fix. Suggestions Please.
John