Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22
Default Nested Ifs & NetworkDays Combined Functions

OK...I've tried consulting many boards to get around the nested if limit in
Excel 2003. I remember seeing something about concatenating strings together,
but I've come to the realization that I'm being lazy.

So, here's what I'm trying to do:
I have a list of 20 people who have entered dates for their holidays.
These 20 people are from one of 8 different countries.
Each country has its own "holidays".

What I've attempted to do (and it works without concern for Holidays) is to
take subtract the number of NETWORKDAYS from the StartDate to the EndDate
(ex. =IF(ISBLANK(E12),"",(NETWORKDAYS(D12,E12,0)- 1))). This works just fine
- again, with complete disregard to holidays.

So, I created a Holidays table that consists of 8 columns. Each column
header is the country name. Under each country is a varying number of dates
(ranging from 8-17 dates). I've named each range under the country header to
match to the respective country.

This is when I thought I had it beat and I tried the following change to my
formula:
=IF(ISBLANK(E12),"",(NETWORKDAYS(D12,E12,B20)- 1))
- where B20 is the Country name for the individual.

This results in a #VALUE! error.

For more info...here's the sample sheet info:
A B C D E
1 Name Locale Start EndDate WorkingDaysGone
2 John UK 10-nov-08 12-nov-08 <formula

For the "Country holidays" i created the following
L M
1 Canada US
2 01-Jan-08 01-Jan-08
3 21-Mar-08 21-Jan-08
4 19-May-08 26-May-08
5 01-Jul-08 04-Jul-08
6 04-Aug-08 01-Sep-08
7 01-Sep-08 13-Oct-08
8 13-Oct-08 27-Nov-08
9 11-Nov-08 25-Dec-08
10 25-Dec-08
11 26-Dec-08
Named Range: L1:L11 = "Canada"
Named Range: M1:M9 = "US"
(there are actually 8 columns in this section)

That setup...I tried to pump this formula into E2:
=IF(ISBLANK(D2),"",(NETWORKDAYS(C2,D12,B2)- 1))

I'm trying to pass the value of the Locale into the function to "act as" the
named range. It does not work.

Does anyone have any suggestions on this??

Thanks in advance.
JCH
--
Dawg House Inc.
"We live in it, therefore, we know it!"
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,805
Default Nested Ifs & NetworkDays Combined Functions

Replace B20 in your formula with INDIRECT(B20) and you should be good to go...

Test it out in a standalone NETWORKDAYS function and then plug it in your IF
statement


--
Always provide your feedback...


"Dawg House Inc" wrote:

OK...I've tried consulting many boards to get around the nested if limit in
Excel 2003. I remember seeing something about concatenating strings together,
but I've come to the realization that I'm being lazy.

So, here's what I'm trying to do:
I have a list of 20 people who have entered dates for their holidays.
These 20 people are from one of 8 different countries.
Each country has its own "holidays".

What I've attempted to do (and it works without concern for Holidays) is to
take subtract the number of NETWORKDAYS from the StartDate to the EndDate
(ex. =IF(ISBLANK(E12),"",(NETWORKDAYS(D12,E12,0)- 1))). This works just fine
- again, with complete disregard to holidays.

So, I created a Holidays table that consists of 8 columns. Each column
header is the country name. Under each country is a varying number of dates
(ranging from 8-17 dates). I've named each range under the country header to
match to the respective country.

This is when I thought I had it beat and I tried the following change to my
formula:
=IF(ISBLANK(E12),"",(NETWORKDAYS(D12,E12,B20)- 1))
- where B20 is the Country name for the individual.

This results in a #VALUE! error.

For more info...here's the sample sheet info:
A B C D E
1 Name Locale Start EndDate WorkingDaysGone
2 John UK 10-nov-08 12-nov-08 <formula

For the "Country holidays" i created the following
L M
1 Canada US
2 01-Jan-08 01-Jan-08
3 21-Mar-08 21-Jan-08
4 19-May-08 26-May-08
5 01-Jul-08 04-Jul-08
6 04-Aug-08 01-Sep-08
7 01-Sep-08 13-Oct-08
8 13-Oct-08 27-Nov-08
9 11-Nov-08 25-Dec-08
10 25-Dec-08
11 26-Dec-08
Named Range: L1:L11 = "Canada"
Named Range: M1:M9 = "US"
(there are actually 8 columns in this section)

That setup...I tried to pump this formula into E2:
=IF(ISBLANK(D2),"",(NETWORKDAYS(C2,D12,B2)- 1))

I'm trying to pass the value of the Locale into the function to "act as" the
named range. It does not work.

Does anyone have any suggestions on this??

Thanks in advance.
JCH
--
Dawg House Inc.
"We live in it, therefore, we know it!"

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,805
Default Nested Ifs & NetworkDays Combined Functions

Also make sure that you have NOT included the country name in the defined
range...

"I've named each range under the country header to
match to the respective country. " indicates that you are good but
Named Range: L1:L11 = "Canada" indicates otherwise...
--
Always provide your feedback...


"Dawg House Inc" wrote:

OK...I've tried consulting many boards to get around the nested if limit in
Excel 2003. I remember seeing something about concatenating strings together,
but I've come to the realization that I'm being lazy.

So, here's what I'm trying to do:
I have a list of 20 people who have entered dates for their holidays.
These 20 people are from one of 8 different countries.
Each country has its own "holidays".

What I've attempted to do (and it works without concern for Holidays) is to
take subtract the number of NETWORKDAYS from the StartDate to the EndDate
(ex. =IF(ISBLANK(E12),"",(NETWORKDAYS(D12,E12,0)- 1))). This works just fine
- again, with complete disregard to holidays.

So, I created a Holidays table that consists of 8 columns. Each column
header is the country name. Under each country is a varying number of dates
(ranging from 8-17 dates). I've named each range under the country header to
match to the respective country.

This is when I thought I had it beat and I tried the following change to my
formula:
=IF(ISBLANK(E12),"",(NETWORKDAYS(D12,E12,B20)- 1))
- where B20 is the Country name for the individual.

This results in a #VALUE! error.

For more info...here's the sample sheet info:
A B C D E
1 Name Locale Start EndDate WorkingDaysGone
2 John UK 10-nov-08 12-nov-08 <formula

For the "Country holidays" i created the following
L M
1 Canada US
2 01-Jan-08 01-Jan-08
3 21-Mar-08 21-Jan-08
4 19-May-08 26-May-08
5 01-Jul-08 04-Jul-08
6 04-Aug-08 01-Sep-08
7 01-Sep-08 13-Oct-08
8 13-Oct-08 27-Nov-08
9 11-Nov-08 25-Dec-08
10 25-Dec-08
11 26-Dec-08
Named Range: L1:L11 = "Canada"
Named Range: M1:M9 = "US"
(there are actually 8 columns in this section)

That setup...I tried to pump this formula into E2:
=IF(ISBLANK(D2),"",(NETWORKDAYS(C2,D12,B2)- 1))

I'm trying to pass the value of the Locale into the function to "act as" the
named range. It does not work.

Does anyone have any suggestions on this??

Thanks in advance.
JCH
--
Dawg House Inc.
"We live in it, therefore, we know it!"

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22
Default Nested Ifs & NetworkDays Combined Functions

Thanks Sheloo. That indirect will be helpful going forward.

Muchly appreciated.
--
Dawg House Inc.
"We live in it, therefore, we know it!"


"Sheeloo" wrote:

Replace B20 in your formula with INDIRECT(B20) and you should be good to go...

Test it out in a standalone NETWORKDAYS function and then plug it in your IF
statement


--
Always provide your feedback...


"Dawg House Inc" wrote:

OK...I've tried consulting many boards to get around the nested if limit in
Excel 2003. I remember seeing something about concatenating strings together,
but I've come to the realization that I'm being lazy.

So, here's what I'm trying to do:
I have a list of 20 people who have entered dates for their holidays.
These 20 people are from one of 8 different countries.
Each country has its own "holidays".

What I've attempted to do (and it works without concern for Holidays) is to
take subtract the number of NETWORKDAYS from the StartDate to the EndDate
(ex. =IF(ISBLANK(E12),"",(NETWORKDAYS(D12,E12,0)- 1))). This works just fine
- again, with complete disregard to holidays.

So, I created a Holidays table that consists of 8 columns. Each column
header is the country name. Under each country is a varying number of dates
(ranging from 8-17 dates). I've named each range under the country header to
match to the respective country.

This is when I thought I had it beat and I tried the following change to my
formula:
=IF(ISBLANK(E12),"",(NETWORKDAYS(D12,E12,B20)- 1))
- where B20 is the Country name for the individual.

This results in a #VALUE! error.

For more info...here's the sample sheet info:
A B C D E
1 Name Locale Start EndDate WorkingDaysGone
2 John UK 10-nov-08 12-nov-08 <formula

For the "Country holidays" i created the following
L M
1 Canada US
2 01-Jan-08 01-Jan-08
3 21-Mar-08 21-Jan-08
4 19-May-08 26-May-08
5 01-Jul-08 04-Jul-08
6 04-Aug-08 01-Sep-08
7 01-Sep-08 13-Oct-08
8 13-Oct-08 27-Nov-08
9 11-Nov-08 25-Dec-08
10 25-Dec-08
11 26-Dec-08
Named Range: L1:L11 = "Canada"
Named Range: M1:M9 = "US"
(there are actually 8 columns in this section)

That setup...I tried to pump this formula into E2:
=IF(ISBLANK(D2),"",(NETWORKDAYS(C2,D12,B2)- 1))

I'm trying to pass the value of the Locale into the function to "act as" the
named range. It does not work.

Does anyone have any suggestions on this??

Thanks in advance.
JCH
--
Dawg House Inc.
"We live in it, therefore, we know it!"

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,344
Default Nested Ifs & NetworkDays Combined Functions

Hi,

Here is one approach:
Suppose you put your different countries in J2:Q18 with the names of the
countries in J1:Q1. Also suppose the country name for the D12, E12 data is
in F12 Then you can use the following formula:


=IF(E12="","",NETWORKDAYS(D12,E12,INDEX(J$2:Q$18,, MATCH(F12,J$1:K$1,0)))-1)


Please click yes if this was helpful.
--
Thanks,
Shane Devenshire


"Dawg House Inc" wrote:

OK...I've tried consulting many boards to get around the nested if limit in
Excel 2003. I remember seeing something about concatenating strings together,
but I've come to the realization that I'm being lazy.

So, here's what I'm trying to do:
I have a list of 20 people who have entered dates for their holidays.
These 20 people are from one of 8 different countries.
Each country has its own "holidays".

What I've attempted to do (and it works without concern for Holidays) is to
take subtract the number of NETWORKDAYS from the StartDate to the EndDate
(ex. =IF(ISBLANK(E12),"",(NETWORKDAYS(D12,E12,0)- 1))). This works just fine
- again, with complete disregard to holidays.

So, I created a Holidays table that consists of 8 columns. Each column
header is the country name. Under each country is a varying number of dates
(ranging from 8-17 dates). I've named each range under the country header to
match to the respective country.

This is when I thought I had it beat and I tried the following change to my
formula:
=IF(ISBLANK(E12),"",(NETWORKDAYS(D12,E12,B20)- 1))
- where B20 is the Country name for the individual.

This results in a #VALUE! error.

For more info...here's the sample sheet info:
A B C D E
1 Name Locale Start EndDate WorkingDaysGone
2 John UK 10-nov-08 12-nov-08 <formula

For the "Country holidays" i created the following
L M
1 Canada US
2 01-Jan-08 01-Jan-08
3 21-Mar-08 21-Jan-08
4 19-May-08 26-May-08
5 01-Jul-08 04-Jul-08
6 04-Aug-08 01-Sep-08
7 01-Sep-08 13-Oct-08
8 13-Oct-08 27-Nov-08
9 11-Nov-08 25-Dec-08
10 25-Dec-08
11 26-Dec-08
Named Range: L1:L11 = "Canada"
Named Range: M1:M9 = "US"
(there are actually 8 columns in this section)

That setup...I tried to pump this formula into E2:
=IF(ISBLANK(D2),"",(NETWORKDAYS(C2,D12,B2)- 1))

I'm trying to pass the value of the Locale into the function to "act as" the
named range. It does not work.

Does anyone have any suggestions on this??

Thanks in advance.
JCH
--
Dawg House Inc.
"We live in it, therefore, we know it!"

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
Networkdays with cells yet to be entered (creating nested if) Jeremy Excel Discussion (Misc queries) 2 June 5th 08 03:50 PM
Count If combined functions Betty H Excel Worksheet Functions 3 March 25th 08 06:59 PM
IF and lookup functions combined? RSS Excel Worksheet Functions 4 January 18th 07 01:04 AM
IF and lookup functions combined? RSS Excel Worksheet Functions 1 January 17th 07 02:00 PM
combined two countif functions Geoff Excel Discussion (Misc queries) 2 August 11th 05 11:51 PM


All times are GMT +1. The time now is 05:06 PM.

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

About Us

"It's about Microsoft Excel"