if statement in excel

September 22, 2011 at 05:30:07
Specs: Windows XP
I need an "if condition" that says if a certain "date" is less then one year from September 30, 2011 display 0.00, if its more then 1 year but less then 2yrs display .05, if its more then 2yrs but less then 3yrs display .10, if its more then 3yrs but less then 4yrs display .15, if its more then 4 years display .20

See More: if statement in excel

September 22, 2011 at 06:03:02
Here's one way to do it. Your dates would be in B1 and C1.


You could also do it with and() like this:


Report •

September 22, 2011 at 07:44:44
If I am not mistaken, the DAYS360 function considers every month to have 30 days and may not return the correct number of days between 2 dates.

Using March 1, 2011 as a Start Date and September 22, 2011 as End Date, DATEDIF returns 205 while DAYS360 returns 201.

9/22/2011 - 3/1/2011 returns 205, so I am assuming that DATEDIF will return the value you are looking for.

See this site for info on how to use the DATEDIF function in Excel:


Wrap the function inside a Nested IF and you should be good to go.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Report •
Related Solutions

Ask Question