Date Calculation in Excel

AXISHK
AXISHK used Ask the Experts™
on
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
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Naresh PatelFinancial Adviser

Commented:
try this
=IF(A1<TODAY()-1095,"Out Of Warranty","In Warranty")

Open in new window

Naresh PatelFinancial Adviser

Commented:
See attached
date.xlsx
Naresh PatelFinancial Adviser
Commented:
Assuming - A column is date of purchase.
=IF(AND(A2<TODAY()-1095,A2<>""),"Out Of Warranty","")

Open in new window

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",""),"")

Open in new window


Thanks
Build an E-Commerce Site with Angular 5

Learn how to build an E-Commerce site with Angular 5, a JavaScript framework used by developers to build web, desktop, and mobile applications.

Most Valuable Expert 2011
Top Expert 2011
Commented:
Just FYI, you can also use DATEDIF:

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

Commented:
It might be safer to use 1096 to take account of possible leap years
or use Rory Archibald's formula.
Naresh PatelFinancial Adviser

Commented:
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
Naresh PatelFinancial Adviser

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

Thanks

Author

Commented:
tks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial