Silverscreen
New Member
- Joined
- May 9, 2014
- Messages
- 22
I have been trying to get NETWORKDAYS formula to work but for some reason it just won't do it. I have resorted to using the below formula but it just doesn't seem to want to take into account the holidays.
so the formula is: IF(WEEKDAY(A3,2)>5,"",NETWORKDAYS(A$2,A3,$R$3:$R$10))
A3 is the actual date, A2 is the first date, R3 to R10 are the holidays. you can see from the results below (06 May is supposed to be a bank holiday, included in R3:R10) but it is still bringing back a result.
[TABLE="width: 192"]
<colgroup><col width="90" style="width: 68pt; mso-width-source: userset; mso-width-alt: 3291;" span="2"> <col width="75" style="width: 56pt; mso-width-source: userset; mso-width-alt: 2742;"> <tbody>[TR]
[TD="width: 90, bgcolor: #00B050"]DATE[/TD]
[TD="width: 90, bgcolor: #00B050"]DAY[/TD]
[TD="width: 75, bgcolor: #00B050"]WD[/TD]
[/TR]
[TR]
[TD="bgcolor: white"]01-May[/TD]
[TD="bgcolor: white"]Wednesday[/TD]
[TD="bgcolor: white"]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: white"]02-May[/TD]
[TD="bgcolor: white"]Thursday[/TD]
[TD="bgcolor: white"]2
[/TD]
[/TR]
[TR]
[TD="bgcolor: white"]03-May[/TD]
[TD="bgcolor: white"]Friday[/TD]
[TD="bgcolor: white"]3
[/TD]
[/TR]
[TR]
[TD]04-May[/TD]
[TD]Saturday[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]05-May[/TD]
[TD]Sunday[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]06-May[/TD]
[TD]Monday[/TD]
[TD]3[/TD]
[/TR]
</tbody>[/TABLE]
When I use just NETWORKDAYS(A$2,A2), it brings back numbers for weekends:
[TABLE="width: 192"]
<colgroup><col width="90" style="width: 68pt; mso-width-source: userset; mso-width-alt: 3291;" span="2"> <col width="75" style="width: 56pt; mso-width-source: userset; mso-width-alt: 2742;"> <tbody>[TR]
[TD="width: 90, bgcolor: #00B050"]DATE[/TD]
[TD="width: 90, bgcolor: #00B050"]DAY[/TD]
[TD="width: 75, bgcolor: #00B050"]WD[/TD]
[/TR]
[TR]
[TD="bgcolor: white"]01-May[/TD]
[TD="bgcolor: white"]Wednesday[/TD]
[TD="bgcolor: white"]1[/TD]
[/TR]
[TR]
[TD="bgcolor: white"]02-May[/TD]
[TD="bgcolor: white"]Thursday[/TD]
[TD="bgcolor: white"]2[/TD]
[/TR]
[TR]
[TD="bgcolor: white"]03-May[/TD]
[TD="bgcolor: white"]Friday[/TD]
[TD="bgcolor: white"]3[/TD]
[/TR]
[TR]
[TD]04-May[/TD]
[TD]Saturday[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]05-May[/TD]
[TD]Sunday[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]06-May[/TD]
[TD]Monday[/TD]
[TD]3[/TD]
[/TR]
</tbody>[/TABLE]
so the formula is: IF(WEEKDAY(A3,2)>5,"",NETWORKDAYS(A$2,A3,$R$3:$R$10))
A3 is the actual date, A2 is the first date, R3 to R10 are the holidays. you can see from the results below (06 May is supposed to be a bank holiday, included in R3:R10) but it is still bringing back a result.
[TABLE="width: 192"]
<colgroup><col width="90" style="width: 68pt; mso-width-source: userset; mso-width-alt: 3291;" span="2"> <col width="75" style="width: 56pt; mso-width-source: userset; mso-width-alt: 2742;"> <tbody>[TR]
[TD="width: 90, bgcolor: #00B050"]DATE[/TD]
[TD="width: 90, bgcolor: #00B050"]DAY[/TD]
[TD="width: 75, bgcolor: #00B050"]WD[/TD]
[/TR]
[TR]
[TD="bgcolor: white"]01-May[/TD]
[TD="bgcolor: white"]Wednesday[/TD]
[TD="bgcolor: white"]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: white"]02-May[/TD]
[TD="bgcolor: white"]Thursday[/TD]
[TD="bgcolor: white"]2
[/TD]
[/TR]
[TR]
[TD="bgcolor: white"]03-May[/TD]
[TD="bgcolor: white"]Friday[/TD]
[TD="bgcolor: white"]3
[/TD]
[/TR]
[TR]
[TD]04-May[/TD]
[TD]Saturday[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]05-May[/TD]
[TD]Sunday[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]06-May[/TD]
[TD]Monday[/TD]
[TD]3[/TD]
[/TR]
</tbody>[/TABLE]
When I use just NETWORKDAYS(A$2,A2), it brings back numbers for weekends:
[TABLE="width: 192"]
<colgroup><col width="90" style="width: 68pt; mso-width-source: userset; mso-width-alt: 3291;" span="2"> <col width="75" style="width: 56pt; mso-width-source: userset; mso-width-alt: 2742;"> <tbody>[TR]
[TD="width: 90, bgcolor: #00B050"]DATE[/TD]
[TD="width: 90, bgcolor: #00B050"]DAY[/TD]
[TD="width: 75, bgcolor: #00B050"]WD[/TD]
[/TR]
[TR]
[TD="bgcolor: white"]01-May[/TD]
[TD="bgcolor: white"]Wednesday[/TD]
[TD="bgcolor: white"]1[/TD]
[/TR]
[TR]
[TD="bgcolor: white"]02-May[/TD]
[TD="bgcolor: white"]Thursday[/TD]
[TD="bgcolor: white"]2[/TD]
[/TR]
[TR]
[TD="bgcolor: white"]03-May[/TD]
[TD="bgcolor: white"]Friday[/TD]
[TD="bgcolor: white"]3[/TD]
[/TR]
[TR]
[TD]04-May[/TD]
[TD]Saturday[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]05-May[/TD]
[TD]Sunday[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]06-May[/TD]
[TD]Monday[/TD]
[TD]3[/TD]
[/TR]
</tbody>[/TABLE]