conditional formatting

J

John Johansen

I am having trouble using conditional formatting when comparing two dates.
What I need is.

Cell A1 has a date 02/01/2007
Cell A2 has a date 03/05/2008

I want cell A2 Highlighted Red if the difference between the dates is 395
days or more.

I'm a novice in excel and any help is appreciated.

Thank you,
 
E

Eduardo

Hi,
go to conditional formating, and use where the formula is
A2-A1>395, options fill with red color
 
J

John Johansen

Hello,

I've tried that and it doesn't work. I'm not sure why because if I goto a
different cell and enter the formula =IF((A2-A1)>395,"NC","C") it returns
either an NC or C like you would expect but for some reason it doesn't
evaluate correctly in conditional formatting.
 
E

Eric D

John use the formula that Eduardo suggests but type an = in front. it worked
for me when i did this
 
T

T. Valko

Select cell A2
Goto the menu Format>Conditional Formatting
Select the Formula Is option
Enter this formula in the box on the right:

=A2-A1>395

Click the Format button
Select the desired style(s)
OK out
 
J

John Johansen

That did it thank you both
--
John Johansen


John Johansen said:
Hello,

I've tried that and it doesn't work. I'm not sure why because if I goto a
different cell and enter the formula =IF((A2-A1)>395,"NC","C") it returns
either an NC or C like you would expect but for some reason it doesn't
evaluate correctly in conditional formatting.
 

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