Excel Formula Last Business of each week

ItalianPlatinum

Well-known Member
Joined
Mar 23, 2017
Messages
774
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hi, looking for an excel formula that will kick back the last business day of each week. for example:

Today Expect result
4/21/21 4/23/21
3/31/21 4/01/21 (good Friday on 04/02/21)
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Consider using WEEKDAY in a formula. For example, if today's date is in cell C3, use =WEEKDAY(C3) in another cell. The result will be 4 because 4/21/21 is the 4th day of the week. Perhaps this will help.
 
Upvote 0
Consider using WEEKDAY in a formula. For example, if today's date is in cell C3, use =WEEKDAY(C3) in another cell. The result will be 4 because 4/21/21 is the 4th day of the week. Perhaps this will help.
How though. because the last BD of the week wont always be Friday if there is a Friday holiday.
 
Upvote 0
The formula I posted identifies Friday when the result = 6, which is the standard last business day of the week. I am not aware of any formula that identifies holidays that exist on a Friday.
 
Upvote 0
How about
+Fluff 1.xlsm
HIJK
1Holidays
221/04/202123/04/202101/01/2021
331/03/202101/04/202102/04/2021
405/04/2021
5
6
Main
Cell Formulas
RangeFormula
I2:I3I2=WORKDAY.INTL(WORKDAY.INTL(H2-1,1,"0111111"),-1,1,$K$2:$K$5)
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0
How about
+Fluff 1.xlsm
HIJK
1Holidays
221/04/202123/04/202101/01/2021
331/03/202101/04/202102/04/2021
405/04/2021
5
6
Main
Cell Formulas
RangeFormula
I2:I3I2=WORKDAY.INTL(WORKDAY.INTL(H2-1,1,"0111111"),-1,1,$K$2:$K$5)
Hi @Fluff , Thanks for the answer, I learnt something new, as usual :). Though, I think it doesn't work with Sundays and Mondays, in which case it returns the last workday in the previous week. Should be corrected as below right?
=WORKDAY.INTL(WORKDAY.INTL(H2-1,1,"1111101"),-1,1,$K$2:$K$5)

Cell Formulas
RangeFormula
M1:S1M1=TEXT(WEEKDAY(M8),"ddd")
M3:S8M3=M2+7
K2K2=M2
K3:K8K3=K2+8
M10:S16M10=WORKDAY.INTL(WORKDAY.INTL(M2-1,1,"1111101"),-1,1,$K$2:$K$8)
M18:S24M18=WORKDAY.INTL(WORKDAY.INTL(M2-1,1,"0111111"),-1,1,$K$2:$K$8)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
M10:S16Expression=M10<>M18textNO
 
Upvote 0
Though, I think it doesn't work with Sundays and Mondays, in which case it returns the last workday in the previous week. Should be corrected as below right?
That depends on how you define the last working day of each week. Whilst the Mondays are wrong with my formulae the Sundays are correct (Sunday being the end of the week not the start) the formula should be
Excel Formula:
=WORKDAY.INTL(WORKDAY.INTL(N2-1,1,"1111110"),-1,1,$K$2:$K$8)
 
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,453
Members
448,967
Latest member
grijken

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