Excel color coding

Closed
Ed - Nov 3, 2010 at 11:24 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Nov 4, 2010 at 10:51 AM
Hello,

I am working on a problem that I can't fix. I want to type in a cell a date like say 12/01/2012. Then 30 days before this date I want it to fill yellow. Then ,on this date I want it to fill red. These are alerts I need. Also, if possible, can I associate the formula with a name. For example, Ed needs to take the course on 12/01/2012. 30 days before the date, Ed and the date have a yellow fill. then on the date both have a red fill. Is any of this possible?

Thanks so much,
Ed (using Excel 2007 and windows 7)

Related:

1 response

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 555
Nov 4, 2010 at 10:51 AM
Hi Ed,

Start by selecting all the cells you want to color. In your case the cell containing the name and the cell containing the date (I used cell B1 for the date).
Then goto the top menu's > format > conditional format.

For condition 1 select "formula is" and enter:
=$B$1=TODAY()
Select the color you want (red).

For condition 2 select "formula is" and enter:
=$B$1-30<=TODAY()
Select the color you want (yellow).

Best regards,
Trowa
1