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>
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Do you mean

=text(date cell,"ddd")
 
Upvote 0
The following formula works for the posted example:

=IF(A2=WORKDAY.INTL(A2-1,1,"0000110"),NETWORKDAYS.INTL($A$15,A2,"0000110"),"H")
 
Upvote 0
Thanks for the reponse.

This formula is to finding out a day. I want to find out working day like if 1st April falls on Saturday then that will not be a working day since its a holiday. This is Just about finding out the working Days excluding holidays.
 
Upvote 0
Hi Tetra,

Is it possible to conditional format the holidays by greying out with colors using a VBA code.
 
Upvote 0
Is it possible to conditional format the holidays by greying out with colors using a VBA code.
It is possible without VBA. For the posted example, apply conditional formatting to range C2:C32 using the following rule:

=$C2="H"
 
Last edited:
Upvote 0
Hi Tetra

Whats happening here is im Keying the dates in the input sheet and deriving Days and working days using the formulas.

Then i have a very small macro where im pasting in the output sheet using a macro. I just wanted to use the macro and add in conditional macro with that macro.

My Macro is below to copy paste the date.

Sub copypaste()
Sheets("Input Sheet").Select
Range("B2:D48").Copy
Sheets("Ouput Sheet").Select
Range("E3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Transpose:=True
Range("A1").Select
End Sub

<tbody>
</tbody><colgroup><col></colgroup>


My Output Sheet

Working Day-8-7-6-5-4HH-3-2123HH45678HH910111213HH1415161718
Calendar Date192021222324252627281234567891011121314151617181920212223
SunMonTueWedThuFriSatSunMonTueWedThuFriSatSunMonTueWedThuFriSatSunMonTueWedThuFriSatSunMonTueWedThu

<tbody>
</tbody><colgroup><col><col span="33"></colgroup>


In this i want fridays and saturdays to be conditional formatted with gery colour.

Sorry for the inconvinence.


<tbody>
</tbody>
 
Upvote 0
Hi Tetra,

Thanks for the formula

However while using the formula i fopund out that the last day of the month is derived as working day "1" instead of "-1".

Could you please let me know the posiible way to derive it as "-1" and First day of the next month as "1".

Thanks
 
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