Next 5 April from any given date in Excel

shazzaxyz

New Member
Joined
May 8, 2021
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi All
I'm trying to return the next 05 April from any given date, with the cell A11 holding the date. I was using this:
=IF(MONTH(A11+1)=4,A11+1,DATE(YEAR(A11)+1,4,5))
Which works fine unless the date I'm using is a month less than 4 (eg jan,feb,march,April) as it will then return to me the 5 April after the one i need, 2021 instead of 2020.

So i then wrote this one, which gives me an error:
=IF(MONTH(A11)<4,(YEAR(A11),month(4),day(05)),(YEAR(A11)+1,month(04),day(05)))
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Hi & welcome to MrExcel.
Maybe
Excel Formula:
=IF(MONTH(A2)<4,DATE(YEAR(A2),4,5),DATE(YEAR(A2)+1,4,5))
 
Upvote 0
@shazzaxyz... Give this formula a try,
Excel Formula:
=DATE(YEAR(A2)+(TEXT(A2,"yyyymmdd")>YEAR(A2)&"0404"),4,5)


@Fluff...check your formula for April 1st through 4th.
 
Upvote 0
I wouldn't be that surprised if it's wrong as I'm not really sure what the OP is after, I just corrected the OP's 2nd formula.
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,771
Members
452,353
Latest member
strainu

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