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 Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
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,223,888
Messages
6,175,213
Members
452,618
Latest member
Tam84

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