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

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
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,911
Messages
6,175,322
Members
452,635
Latest member
laura12345

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