Conditional Formatting, Date Ranges and Rows

C

chickalina

Hello,
I have scoured the newsgroups and searched quite a few posts for what I
would like to do. We will use cell R3 as an example. I have Office 2007 and I
would like to do the following:

Highlight the row green if the date in R3 is less than 30 days old.
Highlight the row yellow if the date in R3 is more than 30 but less than 60
days
Highlight the row red if the date in R3 is more than 60 days old

I have tried a variety of methods, but I cannot get any one to work.

Please help!

thanks so much.

M
 
L

Luke M

Select the entire row.
Conditional format,
formula 1:
=TODAY()<=$R3+30

formula 2:
=AND(TODAY()>$R3+30,TODAY()<=$R3+60)

formula 3:
=TODAY()>$R3+60
 
T

Tom-S

Assuming it's row 3 you want to highlight (i.e. the row with the date in it),
try these steps:

1. Format R3 to date, and type a date in the cell.

2. Click in cell R3 then click Format>Conditional Formatting.

3. Under Condition 1 select 'Formula Is', then type this formula in the next
box
=DATEDIF($R$3,TODAY(),"D")<30

4. Click the Format button, then the Patterns tab, select the green color,
click OK.

5. Back at the Conditional Formatting dialogue, click Add>> and under
Condition 2 select 'Formula Is', then type this formula in the next box
=AND(DATEDIF($R$3,TODAY(),"D")>=30,DATEDIF($R$3,TODAY(),"D")<60)

6. Click the Format button, then the Patterns tab, select the yellow color,
click OK.

7. Back at the Conditional Formatting dialogue, click Add>> and under
Condition 3 select 'Formula Is', then type this formula in the next box
=DATEDIF($R$3,TODAY(),"D")>=60

8. Click the Format button, then the Patterns tab, select the red color,
click OK twice.

9. Copy cell R3 (Ctrl + C), then highlight row 3 (by clicking the row
number), right click, select Paste Special, then Formats, then OK.

That should shade the cells in row 3 according to your conditions. Note I've
amended the conditions slightly: less than 30 is green; 30 or more but less
than 60 is yellow; 60 or more is red.

Hope that works for you.

Regards,

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top