Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
Solved

Date Calculation in Excel

Posted on 2014-03-02
Medium Priority
286 Views
There is a purchase date column in a Excel. Is it possible to write a formula such that is the purchase date - today is more than 3 years. A message "out of warranty" will be displayed.

Tks
0
Question by:AXISHK
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points

LVL 8

Expert Comment

ID: 39899520
try this
``````=IF(A1<TODAY()-1095,"Out Of Warranty","In Warranty")
``````
0

LVL 8

Expert Comment

ID: 39899521
See attached
date.xlsx
0

LVL 8

Assisted Solution

Naresh Patel earned 1000 total points
ID: 39899530
Assuming - A column is date of purchase.
``````=IF(AND(A2<TODAY()-1095,A2<>""),"Out Of Warranty","")
``````
this more refine if there is either column  A is blank or date is in warranty period returns to blank. else Out Of warranty

if you want to returns result if date is in warranty with In Warranty Period then use this
``````=IF(A2<>"",IF(A2<TODAY()-1095,"Out Of Warranty",""),"")
``````

Thanks
0

LVL 85

Accepted Solution

Rory Archibald earned 1000 total points
ID: 39899838
Just FYI, you can also use DATEDIF:

=IF(DATEDIF(A1,TODAY(),"Y")>=3,"Out Of Warranty","In Warranty")
0

LVL 24

Expert Comment

ID: 39900228
It might be safer to use 1096 to take account of possible leap years
or use Rory Archibald's formula.
0

LVL 8

Expert Comment

ID: 39900255
I am on my way back to home so can't help it now. Surly assist you after 2 hours to how to tackle leap year.

Thanks
0

LVL 8

Expert Comment

ID: 39900263
But I guess Mr.Rory Archibald's Formula is more appropriate than mine.

Thanks
0

Author Closing Comment

ID: 39902076
tks
0

Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,â€¦
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaacâ€¦
Suggested Courses
Course of the Month5 days, 15 hours left to enroll