WORKDAY Function excluding Fridays

salahmost

Board Regular
Joined
Feb 19, 2007
Messages
68
I have searched for a Function excluding Fridays and found one by barry houdini for excluding Sundays :
If I have a date in A1 and want to add the number of workdays in B1, counting all days except Fridays as workdays:

=A1-WEEKDAY(A1,3)+INT(7/6*(B1+MIN(5,WEEKDAY(A1,3))))

format as date...How to replace sundays with Fridays?
Thanks in advanced.


-----------------------
Salah
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Perfect Barry ...It works as I needed.
Thank you ...

Is there a way to amend holidays to that Formula ?

Thank you so much for your help.
 
Upvote 0
If I have a period from 01/01/2008 and add 15 days to it, The result must be 17 /01 /2008 (dd-mm-yyyy) ... As 04/01/2008 and 11/01/2008 are Fridays. but the formula result is 19/01/2008 ....How to modify this the formula?
 
Upvote 0
If start date is 1/1/2008 and you add 15 days then I believe the answer would be 19/1/2008. It's only 17/1/2008 if you assume that day 1 is the start date, i.e. if you add 1 day to 1/1/2008 you get 1/1/2008 [Workday doesn't work like that, it assumes that day 1 is the first workday after the start date].

If you want it to work that way, though, you can change formula to

=A1-1-WEEKDAY(A1+1,3)+INT(7/6*(B1+MIN(5,WEEKDAY(A1+1,3))))

If you want to exclude holidays too then you need a different approach entirely. This formula will exclude holidays (listed in H1:H10) and also count the start date as day 1

=SMALL(IF(WEEKDAY(A1+ROW(INDIRECT("1:"&B1*10))-1)<>6,IF(ISNA(MATCH(A1+ROW(INDIRECT("1:"&B1*10))-1,H$1:H$10,0)),ROW(INDIRECT("1:"&B1*10)))),B1)+A1-1

Formula needs to be confirmed with CTRL+SHIFT+ENTER
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,605
Members
449,089
Latest member
Motoracer88

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