Years, Months, Days - Years, Months, Days

tgamonv

New Member
Joined
Feb 9, 2024
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
Hello,

If there a way to subtract Years, Months, Days from Years, Months, Days?

ie.
cell A1 has 2894
cell B1 has 7 years, 11 months, 3 days formula in the cell B1 is =DATEDIF(0,A1,"y") & " Years " & DATEDIF(0,A1,"ym") & " Months " & DATEDIF(0,A1,"md") & " Days "

cell A2 has 981
cell B2 has 2 years, 8 months, 7 days formual in cell B2 is =DATEDIF(0,A2,"y") & " Years " & DATEDIF(0,A2,"ym") & " Months " & DATEDIF(0,A2,"md") & " Days "

I would like to know the difference between B1 and B2 to show years months days in B3

Thank You!
 

Attachments

  • Image2.jpg
    Image2.jpg
    88.7 KB · Views: 8

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Is there any reason you can't subtract A2 from A1?
Cell Formulas
RangeFormula
C1C1=DATEDIF(0,A1-A2,"y") & " Years " & DATEDIF(0,A1-A2,"ym") & " Months " & DATEDIF(0,A1-A2,"md") & " Days "
B1:B2B1=DATEDIF(0,A1,"y") & " Years " & DATEDIF(0,A1,"ym") & " Months " & DATEDIF(0,A1,"md") & " Days "


Although all the days are subjective as they are based on the dates from 1900 to1902 and 1900 to 1907
 
Last edited:
Upvote 0
Is there any reason you can't subtract A2 from A1?
Cell Formulas
RangeFormula
C1C1=DATEDIF(0,A1-A2,"y") & " Years " & DATEDIF(0,A1-A2,"ym") & " Months " & DATEDIF(0,A1-A2,"md") & " Days "
B1:B2B1=DATEDIF(0,A1,"y") & " Years " & DATEDIF(0,A1,"ym") & " Months " & DATEDIF(0,A1,"md") & " Days "


Although all the days are subjective as they are based on the dates from 1900 to1902 and 1900 to 1907
Guess i had a mental block and didn't think of that. That worked perfectly. Thank You!!!
 
Upvote 0

Forum statistics

Threads
1,215,073
Messages
6,122,975
Members
449,095
Latest member
Mr Hughes

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