Finding Out Working Day from the Calendar Date using a formula

aravindkm

Board Regular
Joined
Feb 9, 2017
Messages
50
Hi All,

Can anyone please helpw me with a formula to find out 'Working Day' from the Calendar Date.

For Eg. My Weekend holidays were on Fridays and Saturdays so that i need to get my holiday marked on those days and also my work starts from Mid Month henec we used to update working days as negative numbers as well as positive numbers.

We can Mark fridays and Saturdays as "H" or Can Leave blank.

Example shown below:

DateDayWorking Day
3/19/2017Sun-10
3/20/2017Mon-9
3/21/2017Tue-8
3/22/2017Wed-7
3/23/2017Thu-6
3/24/2017FriH
3/25/2017SatH
3/26/2017Sun-5
3/27/2017Mon-4
3/28/2017Tue-3
3/29/2017Wed-2
3/30/2017Thu-1
3/31/2017FriH
4/1/2017SatH
4/2/2017Sun1
4/3/2017Mon2
4/4/2017Tue3
4/5/2017Wed4
4/6/2017Thu5
4/7/2017FriH
4/8/2017SatH
4/9/2017Sun6
4/10/2017Mon7
4/11/2017Tue8
4/12/2017Wed9
4/13/2017Thu10
4/14/2017FriH
4/15/2017SatH
4/16/2017Sun11
4/17/2017Mon12
4/18/2017Tue13

<tbody>
</tbody><colgroup><col><col><col></colgroup>
 
See if the following formula works for you -- it should be placed on row 2 and drag-copied down:

=IF(A2=WORKDAY.INTL(A2-1,1,"0000110"),NETWORKDAYS.INTL(EOMONTH(A$2,0)+1,A2,"0000110")+(WEEKDAY(EOMONTH(A$2,0)+1)<6)*(MONTH(A$2)=MONTH(A2)),"H")
 
Upvote 0

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Hi tetra,

One query from the below formula.

=IF(A2=WORKDAY.INTL(A2-1,1,"0000110"),NETWORKDAYS.INTL(EOMONTH(A$2,0)+1,A2,"0000110")+(WEEKDAY(EOMONTH(A$2,0)+1)<6)*(MONTH(A$2)=MONTH(A2)),"H")

As per this formula it picks Friday and Saturday as holiday. If i want Saturday and Sunday to mark as holiday what should be the criteria to given like "0000110"

Thanks
 
Upvote 0
... If i want Saturday and Sunday to mark as holiday what should be the criteria to given like "0000110"...
Here it is:

=IF(A2=WORKDAY.INTL(A2-1,1,"0000011"),NETWORKDAYS.INTL(EOMONTH(A$2,0)+1,A2,"0000011")+(WEEKDAY(EOMONTH(A$2,0)+1,2)<6)*(MONTH(A$2)=MONTH(A2)),"H")
 
Upvote 0

Forum statistics

Threads
1,221,541
Messages
6,160,418
Members
451,644
Latest member
hglymph

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