Formula for retirement date

minnie

New Member
Joined
Apr 25, 2002
Messages
28
I need a formula for the following:

Cell E45 = 8/9/2002 (retire date)
Cell E46 = 6/1/1943 (birth date)

In cell E47, I will be subtracting the two dates to get the age in years and months.

In cell E48, I will be subtracting the two dates to get the age in months.

I need it to compute as follows: if cell E45 is <=28 (28th day of month), then I need it to compute effective the following month -- in this case, 9/1/2002. If cell E45 is >=28, then compute on that date.

Thanks in advance for your help.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
G'day,

Cell E45 = 8/9/2002 (retire date)
Cell E46 = 6/1/1943 (birth date)

In cell E47, I will be subtracting the two dates to get the age in years and months.

In cell E48, I will be subtracting the two dates to get the age in months.

I need it to compute as follows: if cell E45 is <=28 (28th day of month), then I need it to compute effective the following month -- in this case, 9/1/2002. If cell E45 is >=28, then compute on that date.

I believe you want to use the DATEDIF function - but wrapped with an IF-statement to cover the months ending in days after the 28th.

=IF(DAY(E45)<=28,DATEDIF(E46,E45,"m"),DATEDIF(E46,E45,"m")+1)

or the same formula re-written:

=DATEDIF(E46,E45,"m")+(IF(DAY(E45)>28,1,0)

for the number of months difference

Hope that helps,
Adam
 
Upvote 0

Forum statistics

Threads
1,214,405
Messages
6,119,320
Members
448,887
Latest member
AirOliver

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