Formula for calculating between 2 dates

aystrawduh

New Member
Joined
Apr 8, 2024
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Good morning ! I am in need of assistance with coming up with a formula that’ll provide me with an 2 month and 5 month evaluation dates for work without counting a summer period. (05/31/24-08/11/24)

So let’s say a Hire Date is 01/01/24
2 month would be 03/01/24
5 month would be 05/01/24

But if a hire date is 04/10/24 the 2 month and 5 month would need to be adjusted to remove the summer period.

I hope this makes sense and I appreciate the help in advance!!
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
I'm not sure how you want to count the endpoint days. But, this may be something you can start with:
(in your example you only added 4 to the date to get 5/1/2024, if you add 5, it goes into June).

Book1
ABC
1Holiday StartHoliday End
22024-05-312024-08-11
3
4Month outEval Date
52024-01-0122024-03-01
62024-01-0152024-08-12
72024-04-1022024-08-21
82024-04-1052024-11-21
Sheet1
Cell Formulas
RangeFormula
C5:C8C5=IF(EDATE($A5,$B5)<$A$2,EDATE($A5,$B5),EDATE($A5,$B5)-$A$2+$B$2)
 
Upvote 0
2 months out: =LET( dateList, EDATE(A5, SEQUENCE(12)), INDEX( FILTER( dateList, ( dateList <= DATE( 2024, 5, 31 )) + ( dateList >= DATE( 2024, 8, 11 ))), 2 ))
5 months out: =LET( dateList, EDATE(B5, SEQUENCE(12)), INDEX( FILTER( dateList, ( dateList <= DATE( 2024, 5, 31 )) + ( dateList >= DATE( 2024, 8, 11 ))), 5 ))
 
Upvote 0

Forum statistics

Threads
1,215,429
Messages
6,124,837
Members
449,193
Latest member
MikeVol

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