• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 291
  • Last Modified:

Date Calculation in Excel

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
AXISHK
Asked:
AXISHK
2 Solutions
 
Naresh PatelTraderCommented:
try this
=IF(A1<TODAY()-1095,"Out Of Warranty","In Warranty")

Open in new window

0
 
Naresh PatelTraderCommented:
See attached
date.xlsx
0
 
Naresh PatelTraderCommented:
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
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Rory ArchibaldCommented:
Just FYI, you can also use DATEDIF:

=IF(DATEDIF(A1,TODAY(),"Y")>=3,"Out Of Warranty","In Warranty")
0
 
EirmanChief Operations ManagerCommented:
It might be safer to use 1096 to take account of possible leap years
or use Rory Archibald's formula.
0
 
Naresh PatelTraderCommented:
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
 
Naresh PatelTraderCommented:
But I guess Mr.Rory Archibald's Formula is more appropriate than mine.

Thanks
0
 
AXISHKAuthor Commented:
tks
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now