ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   NETWORKDAYS problem (https://www.excelbanter.com/excel-programming/337881-networkdays-problem.html)

Rick, United Kingdom

NETWORKDAYS problem
 
I am using the NETWORKDAYS function to calculate the number of days between
2 dates. this is fine but i want to turn those days into weeks. i added "/4"
to turn the counted days to whole five day weeks. But when i come to add a
charge to those weeks, i get a wrong figure. i.e
01/01/05 - 31/01/05 = 4 weeks * £1 = £4.40. when it should be £4.00. is it
networkdays formula thats making this error or me?

Ron Rosenfeld

NETWORKDAYS problem
 
On Sun, 21 Aug 2005 13:24:02 -0700, "Rick, United Kingdom"
wrote:

I am using the NETWORKDAYS function to calculate the number of days between
2 dates. this is fine but i want to turn those days into weeks. i added "/4"
to turn the counted days to whole five day weeks. But when i come to add a
charge to those weeks, i get a wrong figure. i.e
01/01/05 - 31/01/05 = 4 weeks * £1 = £4.40. when it should be £4.00. is it
networkdays formula thats making this error or me?


The formula is doing exactly what you tell it to, but I don't understand how
you get 4.40; given what you write, you should be getting 5.25.

In any event, Networkdays assumes that Sat and Sun are weekend days and does
not count them. It counts your starting day and your ending day.

1 Jan 2005 is a Saturday; 31 Jan 2005 is a Monday. Networkdays properly tells
you there are 21 working days.

But these are 5 day weeks; so you should divide the result by 5 and not by 4.
Since your number is not evenly divisible by 5, the result is not 4 but rather
4.2.

How you should handle this depends on how you wish to handle fractional weeks.
And that you will have to post here.

You can leave them as fractions, round up, or round down.


--ron

Bob Phillips[_6_]

NETWORKDAYS problem
 
That is because you are also getting a fraction.

Round it, either normal, or up or down

=ROUND(A1,0)
=ROUNDUP(A1,0)
=ROUNDDOWN(A1,0)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Rick, United Kingdom" wrote
in message ...
I am using the NETWORKDAYS function to calculate the number of days

between
2 dates. this is fine but i want to turn those days into weeks. i added

"/4"
to turn the counted days to whole five day weeks. But when i come to add a
charge to those weeks, i get a wrong figure. i.e
01/01/05 - 31/01/05 = 4 weeks * £1 = £4.40. when it should be £4.00. is it
networkdays formula thats making this error or me?





All times are GMT +1. The time now is 10:35 AM.

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