Subtract three months from date - return 1st and last day of month

_eNVy_

Board Regular
Joined
Feb 9, 2018
Messages
66
Office Version
  1. 365
Platform
  1. Windows
Example :
Date in A5 = 31/10/2022

Cell B9 =
Excel Formula:
=EDATE(A5,-3)
gives me 31/07/2022
Cell A9 =
Excel Formula:
=EDATE(B9,-3)+1
returns 01/05/2022

These results are great. But when I change the date in A5 to 30/11/2022, dates in B9 changes to 30/08/2022 (which is not the last day of that month) and A9 returns 31/05/2022 which is not the first day of June.

Thank you for your support.
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
B9 is still taking a further 3 months off of the B9 result

A5 = 31/10/22
B9 takes 3 months off - a5 - 3months
then
A9 is lokking at B9 - 31/7/22
and taking 3 months off - 31/4/22 and than +1 so 1/5/22
 
Upvote 0
If you always want the last day if the month, then you need to use the EOMONTH function, not EDATE
 
Upvote 0
Solution

Forum statistics

Threads
1,215,585
Messages
6,125,679
Members
449,248
Latest member
wayneho98

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