Weekdays function

Oldham_mark

New Member
Joined
Jan 28, 2015
Messages
2
Hi

I am trying to find a formula that will bring up the previous working day if the day I input is not a working day (due to either a weekend or Bank Holiday). If the day input is a working day I would like to bring back that day.

If I input a date in cell A1, and wish to return the corrected date in cell B1, what formula would I need in B1?

I have been using =WEEKDAY(A1+1,-1) but this only corrects the date for weekends, not Bank Holidays

Many Thanks
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Weekday has a provision for holidays as an optional 3rd argument. Put your bank holidays into a list and either create a named range and use that in your formula or just use the cell references with the bank holiday dates in them.
 
Upvote 0
Sorry meant workday! This for example:

=IF(WORKDAY(A1-1,1,holidays)=A1,A1,WORKDAY(A1,-1,holidays))
 
Upvote 0

Forum statistics

Threads
1,215,050
Messages
6,122,868
Members
449,097
Latest member
dbomb1414

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