Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
RMTP
 
Posts: n/a
Default "Empty" values in holiday parameter for NETWORKDAYS() function

If the holiday vector in NETWORKDAYS(start,end,holiday_vector) contains any
"null" strings (i.e. they've had the value "" inserted), then NETWORKDAYS()
returns #VALUE!

Any ideas how to get around this? I do need to have the empty cells - the
vector can be used for different countries, with different numbers of
holidays. And I can't use zero as the empty filler, since 0 actually
represents a valid date.

I'm converting from OpenOffice's spreadsheet which doesn't have the same
problem.

tia.
rmtp
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Debra Dalgleish
 
Posts: n/a
Default "Empty" values in holiday parameter for NETWORKDAYS() function

You could use a dynamic range for the holidays, and it will adjust to
fit the number of dates. There are instructions he

http://www.contextures.com/xlNames01.html

RMTP wrote:
If the holiday vector in NETWORKDAYS(start,end,holiday_vector) contains any
"null" strings (i.e. they've had the value "" inserted), then NETWORKDAYS()
returns #VALUE!

Any ideas how to get around this? I do need to have the empty cells - the
vector can be used for different countries, with different numbers of
holidays. And I can't use zero as the empty filler, since 0 actually
represents a valid date.

I'm converting from OpenOffice's spreadsheet which doesn't have the same
problem.

tia.
rmtp


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default "Empty" values in holiday parameter for NETWORKDAYS() function

Try this:

Instead of "", try using a common holiday (even if it would be a duplicate),
like 1/1 or 12/25 or whatever would be most common to all situations.

Alternatively, if your list is populated by formulas....have the skipped
cell just refer to the date above it.

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"RMTP" wrote:

If the holiday vector in NETWORKDAYS(start,end,holiday_vector) contains any
"null" strings (i.e. they've had the value "" inserted), then NETWORKDAYS()
returns #VALUE!

Any ideas how to get around this? I do need to have the empty cells - the
vector can be used for different countries, with different numbers of
holidays. And I can't use zero as the empty filler, since 0 actually
represents a valid date.

I'm converting from OpenOffice's spreadsheet which doesn't have the same
problem.

tia.
rmtp

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
RMTP
 
Posts: n/a
Default "Empty" values in holiday parameter for NETWORKDAYS() function

Thanks, that's the workround I decided to use while waiting for a reply :-)
The one you reference is more elegant than mine though:

NETWORKDAYS(start,end,$N$6:INDIRECT(CONCATENATE("$ N$",ROW($N$6)+$N$21-1)))

where my holiday vector (including blanks) is in N6:N20, and N21 contains
COUNT(N6:N20)

rmtp

"Debra Dalgleish" wrote:

You could use a dynamic range for the holidays, and it will adjust to
fit the number of dates. There are instructions he

http://www.contextures.com/xlNames01.html

RMTP wrote:
If the holiday vector in NETWORKDAYS(start,end,holiday_vector) contains any
"null" strings (i.e. they've had the value "" inserted), then NETWORKDAYS()
returns #VALUE!

Any ideas how to get around this? I do need to have the empty cells - the
vector can be used for different countries, with different numbers of
holidays. And I can't use zero as the empty filler, since 0 actually
represents a valid date.

I'm converting from OpenOffice's spreadsheet which doesn't have the same
problem.

tia.
rmtp



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
RMTP
 
Posts: n/a
Default "Empty" values in holiday parameter for NETWORKDAYS() function

Alternatively, if your list is populated by formulas....have the skipped
cell just refer to the date above it.


Thanks. Yes, that would work. I considered that - merely duplicating the
final holiday into the remaining formerly-blank cells. A bit clumsy though,
in terms of how that holiday vector looks.

rmtp

"Ron Coderre" wrote:

Try this:

Instead of "", try using a common holiday (even if it would be a duplicate),
like 1/1 or 12/25 or whatever would be most common to all situations.

Alternatively, if your list is populated by formulas....have the skipped
cell just refer to the date above it.

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"RMTP" wrote:

If the holiday vector in NETWORKDAYS(start,end,holiday_vector) contains any
"null" strings (i.e. they've had the value "" inserted), then NETWORKDAYS()
returns #VALUE!

Any ideas how to get around this? I do need to have the empty cells - the
vector can be used for different countries, with different numbers of
holidays. And I can't use zero as the empty filler, since 0 actually
represents a valid date.

I'm converting from OpenOffice's spreadsheet which doesn't have the same
problem.

tia.
rmtp



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default "Empty" values in holiday parameter for NETWORKDAYS() function

Hi!

Here's another option:

A1 = start date
A2 = end date

J1:J10 = holidays. Some cells may contain "".

Entered as an array using the key combo of CTRL,SHIFT,ENTER:

=NETWORKDAYS(A1,A2,IF(ISNUMBER(J1:J10),J1:J10,1000 000))

The blank ("") cells in the holiday array will evaluate to serial date
1000000 = 11/26/4637. I doubt that you're calculating work days that far
into the future!

Biff

"RMTP" wrote in message
...
If the holiday vector in NETWORKDAYS(start,end,holiday_vector) contains
any
"null" strings (i.e. they've had the value "" inserted), then
NETWORKDAYS()
returns #VALUE!

Any ideas how to get around this? I do need to have the empty cells - the
vector can be used for different countries, with different numbers of
holidays. And I can't use zero as the empty filler, since 0 actually
represents a valid date.

I'm converting from OpenOffice's spreadsheet which doesn't have the same
problem.

tia.
rmtp



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
daddylonglegs
 
Posts: n/a
Default "Empty" values in holiday parameter for NETWORKDAYS() function


RMTP Wrote:
Thanks, that's the workround I decided to use while waiting for a reply
:-)
The one you reference is more elegant than mine though:

NETWORKDAYS(start,end,$N$6:INDIRECT(CONCATENATE("$ N$",ROW($N$6)+$N$21-1)))

where my holiday vector (including blanks) is in N6:N20, and N21
contains
COUNT(N6:N20)



Perhaps better....

=NETWORKDAYS(start,end,$N$6:INDEX($N$6:$N$20,$N$21 ))


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=537505

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom functions calculating time arguments Help Desperate Bill_De Excel Worksheet Functions 12 April 25th 06 02:22 AM
Large Function returning top values J Shrimps, Jr. Excel Worksheet Functions 8 March 31st 06 04:02 AM
LOOKUP FUNCTION WITH SUMS VALUES Jamesy Excel Discussion (Misc queries) 3 January 10th 05 03:03 PM
Unknown IF function parameter on amortization schedule Michael from Austin Excel Worksheet Functions 1 November 9th 04 06:32 PM
need to save values from a function before it changes Ron Excel Worksheet Functions 1 October 29th 04 06:29 AM


All times are GMT +1. The time now is 09:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"