ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Conditional color fill (https://www.excelbanter.com/excel-discussion-misc-queries/151710-conditional-color-fill.html)

Monte

Conditional color fill
 
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


mwam423

Conditional color fill
 
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()-b260; 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).

"Monte" wrote:

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



Monte

Conditional color fill
 
Excellent! Thanks for your help.

On Jul 25, 7:56 pm, mwam423 wrote:
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()-b260; 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).



"Monte" wrote:
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- Hide quoted text -


- Show quoted text -




mwam423

Conditional color fill
 
forgot to include this link, lots of great help here

http://www.cpearson.com/excel/cformatting.htm


All times are GMT +1. The time now is 03:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com