Custom Date format and calculations

Greep3r

New Member
Joined
Aug 28, 2019
Messages
3
Good Day

I am trying to find a way to type and only indicate the number of years and months in one cell. This format must also then be used to calculate and end date for a contract term.

I would like to be able to display the cell value as 9 y 11 m or 2 y 3 m etc...

This must then be added to a start date of for example 01 Oct 2019 to display an end date.

I have tried custom formatting like y "y" m "m" but this requires a full date to be typed and will not work for this purpose.

Any suggestions will be helpful.

Thanks
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
With a start date in A1

Format the year and month cell (B1) as Custom format

00\y 00\m

Enter the years and months as TWO digits each, e.g. for 1 year and 2 months enter 0102

in C1
=EDATE(A1,INT(B1/100)*12+RIGHT(B1,2))
format as a date

Adjust the cell references in the formulas to reflect the cell references in your spreadsheet
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,703
Messages
6,173,973
Members
452,540
Latest member
haasro02

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