Thread: Networkdays
View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
David Biddulph[_2_] David Biddulph[_2_] is offline
external usenet poster
 
Posts: 8,651
Default Networkdays

Sorry, Lyn, you are still making it very difficult for us to help you. You
still haven't answered the questions, and you still haven't told us what it
was that you thought didn't work.

You talked of using the formula =NETWORKDAYS(B5,BJ5,AV5:AY5)

If AV5:AY5 contains 24 Dec 08, 25 Dec 08, and 31 Dec 08 respectively, and
you've got 1 Dec 08 and 1 Feb 09 in B5 and BJ5 it seems to be working in the
same way that it would have done if you'd had AV5:AW5 as your second
parameter (in other words only 24 and 25 Dec 08). Including 31 Dec 08
removes one more working day from the result, as we would expect it to.

What were you doing when it gave you the #VALUE! answer?

I don't understand why you've got the zeros in the array you've included
below =NETWORKDAYS(B5,BJ5,{39806,0,39807,0,39813,0,}) but they shouldn't
cause a problem. What does cause a problem is the stray comma at the end of
the string.
=NETWORKDAYS(B5,BJ5,{39806,0,39807,0,39813,0,0}) would be legal, but
=NETWORKDAYS(B5,BJ5,{39806,0,39807,0,39813,0,}) wouldn't.
=NETWORKDAYS(B5,BJ5,{39806,0,39807,0,39813,0,0}) gives the same result as
=NETWORKDAYS(B5,BJ5,AV5:AY5) does, given that AV5:AY5 contains 24 Dec 08, 25
Dec 08, and 31 Dec 08 respectively as described above.

If you tell us what your problem was, we can try to explain it for you.

The sort of thing which would give a #VALUE! error, as someone said earlier,
is if AY5 didn't contain a real date value for 31 Dec 08, but contained a
text string which Excel didn't interpret as a date.
--
David Biddulph

"Lyn" wrote in message
...

Yeah, the last day in December is the 31st, a holiday....I figured out a
way
to do it by using the serial numbers of the date cells, so I came up with
the
following:

=NETWORKDAYS(B5,BJ5,{39806,0,39807,0,39813,0,})

Thanks to everyone.



"David Biddulph" wrote:

Perhaps you missed the second half of my sentence?
"... and what data values are in the cells which the formula calls up?"

Also, I'm confused by your reply saying "I would like to get rid of BJ5".
BJ5 is the end date, so how can you calculate the number of working days
between start date and end date if you get rid of the end date?
--
David Biddulph

"Lyn" wrote in message
...


"David Biddulph" wrote:

What formula are you using, and what data values are in the cells
which
the
formula calls up?
--
David Biddulph
=NETWORKDAYS(B5,BJ5,AV5:AY5)

This works great if that were the only two holidays I wanted to get rid
of;
however, I would like to get rid of BJ5....This is the Month of
December.


"Lyn" wrote in message
...
This function works great if I don't try to exclude the
holiday....Here's
my
problem, I have columns for the entire month and I need to calculate
the
number of weekdays AND the number of weekdays less the
holidays....this
works
fine if my holidays are in a row i.e. 12/24 and 12/25 (AV5:AV6);
however,
if
I would like to take the 31st out also, it gives me the #value
signal....any
help out there?