ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Combining an If Statement with NETWORKDAYS function (https://www.excelbanter.com/excel-discussion-misc-queries/95137-re-combining-if-statement-networkdays-function.html)

Shirley Munro

Combining an If Statement with NETWORKDAYS function
 

Hi

Here is my problem. I am trying to work out the number of working days
between 2 dates to assess delivery performance. In some instances it is
a positive number of days because goods have been delivered early and
in others it is a negative number of days because goods have been
delivered late. To get an accurate number of working days, I am using
the NETWORKDAYS function and then subtracting 1 more day. This is fine
where the number of days is a positve value but where the number of days
is a negative value, I actually need to add 1 more day on. Hopefully
the screenshot will illustrates this. The formula I have used in P2
is:

=NETWORKDAYS(O2,N2)-1

The answer appears as -5 but in actual fact it should be -3

The formula has been copied in the remaining cells in column P. It
gives the correct answer in P3 because this is a positive number of
days.

I wondered if I could combined an If statement with NETWORKDAYS but
couldn't get this to work.

Any help would be much appreciated

Shirley Munro


--
Shirley Munro
------------------------------------------------------------------------
Shirley Munro's Profile: http://www.excelforum.com/member.php...nfo&userid=836
View this thread: http://www.excelforum.com/showthread...hreadid=554002


Bob Phillips

Combining an If Statement with NETWORKDAYS function
 
=NETWORKDAYS(O2,N2)+IF(NETWORKDAYS(O2,N2)0,-1,1)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Shirley Munro"
wrote in message
news:Shirley.Munro.29r23s_1150889147.1099@excelfor um-nospam.com...

Hi

Here is my problem. I am trying to work out the number of working days
between 2 dates to assess delivery performance. In some instances it is
a positive number of days because goods have been delivered early and
in others it is a negative number of days because goods have been
delivered late. To get an accurate number of working days, I am using
the NETWORKDAYS function and then subtracting 1 more day. This is fine
where the number of days is a positve value but where the number of days
is a negative value, I actually need to add 1 more day on. Hopefully
the screenshot will illustrates this. The formula I have used in P2
is:

=NETWORKDAYS(O2,N2)-1

The answer appears as -5 but in actual fact it should be -3

The formula has been copied in the remaining cells in column P. It
gives the correct answer in P3 because this is a positive number of
days.

I wondered if I could combined an If statement with NETWORKDAYS but
couldn't get this to work.

Any help would be much appreciated

Shirley Munro


--
Shirley Munro
------------------------------------------------------------------------
Shirley Munro's Profile:

http://www.excelforum.com/member.php...nfo&userid=836
View this thread: http://www.excelforum.com/showthread...hreadid=554002





All times are GMT +1. The time now is 12:08 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com