Different Between Two Dates Returning Number of Years, Months, Days

gymwrecker

Active Member
Joined
Apr 24, 2002
Messages
390
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Need help with the following:

I have the following two dates.

A1=20090930
B1=20200531

I need the formula to return the following in C1: "XX Years, XX Months, XX Days".

Note: I searched the forum and couldn't find a formula for this.
 
but it's not working for me as a1/b1 aren't date formats
In post#2 davesexcel asked if they were dates, to which the OP replied yes.
Also if you put real dates in A1 & B1 you will get the same result the OP reported in post#5
 
Upvote 0

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
How about
Excel Formula:
=DATEDIF(A1,B1,"Y")&" Years "&DATEDIF(A1,B1,"ym")&" Months "&DATEDIF(A1,B1,"md")&" Days"
After I formatted A1 and B1 as "DATE", copied your formula and it worked! Thank you all for your help!!!
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,952
Messages
6,122,458
Members
449,085
Latest member
ExcelError

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top