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: 16

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
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,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

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