Network Days & IF Statements

bloodmilksky

Board Regular
Joined
Feb 3, 2016
Messages
202
[h=2]Network Days & IF Statements[/h]
Hi Guys,

I hope you are all having a great friday
smile.gif


I was just wondering if anyone could help me combine the power of Networkdays and IF Statement so currently

I have a start Date In A1 and End Date in B1 then either AM,PM Or Full in C1 with the days total in D1

I wondered if anyone would know how to merge NetworkDays & IF together so if there was AM Or PM in C1 it would only count as 0.5 and if Full it would count as 1.

any help would be greatly appreciated
smile.gif


Jamie​
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Cross-Posted here: Network Days & IF Statements

While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule #13 here along with the explanation: Forum Rules). This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
 
Upvote 0
OK, I've just tried it again.

Cell A1=31/03/2016
Cell B1=01/04/2016
Cell C1=AM

Cell D1 has the formula =IF(OR(C1="AM",C1="PM"),NETWORKDAYS(A1,B1)/2,NETWORKDAYS(A1,B1))

Cell D1 value = 1.0


Cell A1=31/03/2016
Cell B1=31/03/2016
Cell C1=AM

Cell D1 has the formula =IF(OR(C1="AM",C1="PM"),NETWORKDAYS(A1,B1)/2,NETWORKDAYS(A1,B1))

Cell D1 value = 0.5
 
Upvote 0
edit..
Thought post #7 was from OP at the time I wrote this response...

Those ARE the correct answers given the sample values you just posted.

There are 2 networkdays between 31/03/2016 and 04/01/2016
The networkdays count is INCLUSIVE of BOTH beginnning and ending dates, so 31/03/2016 counts as 1 day, 04/01/2016 counts as another, total of 2.
2/2 = 1

Try using the Formula Evaluation tool on the Formulas Tab, this will show the calucation steps in action.
 
Last edited:
Upvote 0
Hi,

it was my fault there was a blank value in "am " and "pm " that I didnt see. the formula works perfectly.

thank you really appreciate your help :)
 
Upvote 0

Forum statistics

Threads
1,214,943
Messages
6,122,380
Members
449,080
Latest member
Armadillos

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