Counted Days

francoiscj1

New Member
Joined
Aug 21, 2017
Messages
33
Office Version
  1. 365
Platform
  1. Windows
This is my formula:

=IF(ISERROR(MATCH(A1+37,$E$1:$E$12,0)),IF(WEEKDAY(A1+37)=7,A1+37-1,IF(WEEKDAY(A1+37)=1,A1+37-2,A1+37)),IF(WEEKDAY(A1+37-1)=7,A1+37-2,IF(WEEKDAY(A1+37-1)=1,A1+37-3,A1+37-1)))

My holidays are E1:E12

I would like to amend this formula so that if the date lands on Tuesday through Friday, it will land on the following Monday. For example, if the date is 02/07/18, the date will land on 02/12/18.

Thank you for the help.
 

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.
I don't know if I can help but I'd really like to see a table as to what that all means.
I'm assuming that Col A is a sequence of dates and Col E (rather E1:E12) is what you'd like to see?

Then too, where will that formula reside? F1:F12 dragged down?
 
Last edited:
Upvote 0
Your current formula seems to be adding 37 days to a date and then adjusting it to the previous day, if a holiday, or previous Friday if original or adjusted day lands on a weekend. You could do that more easily using WORKDAY function like this:

=WORKDAY(A1+37+1,-1,holidays)

If you only want to get a Monday as the answer then you can do something similar with WORKDAY.INTL, I.e

=WORKDAY.INTL(A1+37-1,1,"0111111",holidays)

That will always give you a Monday, either exactly A1+37 if that,s a Monday, or the following Monday if it’s not
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,915
Members
452,366
Latest member
TePunaBloke

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