Conditional color fill

M

Monte

Hello,

I would like to know how to do the following:

If a date in a cell is less than thirty days old, fill the cell with
green; more than thirty days old, fill the cell with yellow; more than
sixty days old, fill the cell with red.

Thanks
 
M

mwam423

assuming you're comparing date to today's date and you're in cell B2, select
Format from menu bar, highlight Conditional Formatting and click.

in condition 1 box, select "Formula Is" from the "Cell Value Is" pulldown
menu, enter following in box to right: =now()-b2<30, then click on Format to
choose cell color.

repeat for condition 2 with equation: =now()-b2>60; for condition 3:
=now()-b2>=30

then Copy the cell and Special Paste-Format over range you want the
conditional format to apply

please note, b2 in formula should not have any fixed references ($), also
slightly changed your request by changing condition 3 to include the 30 days
(otherwise if/when value equals 30 days no color format would be applied).
 
M

Monte

Excellent! Thanks for your help.

assuming you're comparing date to today's date and you're in cell B2, select
Format from menu bar, highlight Conditional Formatting and click.

in condition 1 box, select "Formula Is" from the "Cell Value Is" pulldown
menu, enter following in box to right: =now()-b2<30, then click on Format to
choose cell color.

repeat for condition 2 with equation: =now()-b2>60; for condition 3:
=now()-b2>=30

then Copy the cell and Special Paste-Format over range you want the
conditional format to apply

please note, b2 in formula should not have any fixed references ($), also
slightly changed your request by changing condition 3 to include the 30 days
(otherwise if/when value equals 30 days no color format would be applied).








- Show quoted text -
 
Top