Formula to add years and months

mdnsh

New Member
Joined
Oct 18, 2023
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Hello All,

What could be the formula for total years ( 8 Years, 3 Months) in the below case?
1728449099391.png

Thanks in advance.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Something like this?

24 10 09.xlsm
ABC
1
24 Years, 1.5 Months4 Years, 1.5 Months8 Years, 3 Months
36 Years, 1.5 Months4 Years, 7 Months10 Years, 8.5 Months
44 Years, 1.5 Months8 Years, 11.5 Months13 Years, 1 Months
Years Months
Cell Formulas
RangeFormula
C2:C4C2=LET(a,TEXTSPLIT(A2&B2,{"Years, "," Months"}),m,SUM(--INDEX(a,{2,4})),SUM(--INDEX(a,{1,3}),INT(m/12))&" Years, "&MOD(m,12)&" Months")
 
Upvote 0
Something like this?

24 10 09.xlsm
ABC
1
24 Years, 1.5 Months4 Years, 1.5 Months8 Years, 3 Months
36 Years, 1.5 Months4 Years, 7 Months10 Years, 8.5 Months
44 Years, 1.5 Months8 Years, 11.5 Months13 Years, 1 Months
Years Months
Cell Formulas
RangeFormula
C2:C4C2=LET(a,TEXTSPLIT(A2&B2,{"Years, "," Months"}),m,SUM(--INDEX(a,{2,4})),SUM(--INDEX(a,{1,3}),INT(m/12))&" Years, "&MOD(m,12)&" Months")
Hi Peter,

Thank you for the response.
Tried the same and getting an error. Am i missing something here? Thanks.
1728455752426.png
 
Upvote 0
Tried the same and getting an error. Am i missing something here?
That would indicate that either ..
  • You do not have Microsoft 365 as your profile indicates or
  • You do have 365 but have not applied available updates to it.
 
Upvote 0

Forum statistics

Threads
1,223,876
Messages
6,175,123
Members
452,614
Latest member
MRSWIN2709

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