ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do you Identify text as a named range in excel (https://www.excelbanter.com/excel-discussion-misc-queries/87255-how-do-you-identify-text-named-range-excel.html)

DMDave

How do you Identify text as a named range in excel
 
Is there a way to identify to excel in that the following formula:
=SUM(INDIRECT(C1&"2005.355")),
this part INDIRECT(C1&"2005.355") is a named range in the wb?


Where c1=Jan
and,
the named range is Jan2005.355.

This refers to the same question I posted a few minutes ago if it will
help understand the question more.

Thanks
Dave

Pete_UK

How do you Identify text as a named range in excel
 
Dave,

I've responded to your other post.

Pete


Biff

How do you Identify text as a named range in excel
 
Hi!

Is the named range just a named range:

Jan2005.355 refers to:

=Sheet1!$A$1:$A$10

Or, is the named range really a named formula (dynamic range):

Jan2005.355 refers to:

=OFFSET(Sheet1!$A$1,,,COUNTA(Sheet1!$A:$A))

If it's the latter, Indirect won't work.

Biff

"DMDave" wrote in message
...
Is there a way to identify to excel in that the following formula:
=SUM(INDIRECT(C1&"2005.355")),
this part INDIRECT(C1&"2005.355") is a named range in the wb?


Where c1=Jan
and,
the named range is Jan2005.355.

This refers to the same question I posted a few minutes ago if it will
help understand the question more.

Thanks
Dave




DMDave

How do you Identify text as a named range in excel
 
Hi Biff,
The named range is just a named range
=NS2005!$C$9,NS2005!$C$17,NS2005!$C$25,NS2005!$C$3 3,NS2005!$C$41

For some reason Excel isn't recognizing the result of the indirect as
a named range. No matter what I do it just returns a #REF.
Im stumped.
If I just use =SUM(Jan2005.355) it does return the correct answer but
I have to put in a variable to be able to change the month from Jan to
Feb to Mar etc...
Is there a possible alternative solution?

Thanks
Dave

On Sat, 6 May 2006 21:50:50 -0400, "Biff"
wrote:

Hi!

Is the named range just a named range:

Jan2005.355 refers to:

=Sheet1!$A$1:$A$10

Or, is the named range really a named formula (dynamic range):

Jan2005.355 refers to:

=OFFSET(Sheet1!$A$1,,,COUNTA(Sheet1!$A:$A))

If it's the latter, Indirect won't work.

Biff

"DMDave" wrote in message
.. .
Is there a way to identify to excel in that the following formula:
=SUM(INDIRECT(C1&"2005.355")),
this part INDIRECT(C1&"2005.355") is a named range in the wb?


Where c1=Jan
and,
the named range is Jan2005.355.

This refers to the same question I posted a few minutes ago if it will
help understand the question more.

Thanks
Dave




Biff

How do you Identify text as a named range in excel
 
The named range is just a named range
=NS2005!$C$9,NS2005!$C$17,NS2005!$C$25,NS2005!$C$ 33,NS2005!$C$41


That still won't work with Indirect because it's not a contiguous single
range reference . To Indirect, it's 5 separate arguments.

About the only thing I can think of is something like this:

=SUM(CHOOSE(MATCH(C1,{"Jan","Feb"},0),Jan2005.355, Feb2005.355))

This could be quite long if you have 12 named ranges, 1 for each month.

You can make it a little shorter by creating a named formula for the months:

Months
Refers to: ={"Jan","Feb","Mar",etc., etc., "Dec"}

Or, list the months in a range of cells:

A1 = Jan
A2 = Feb
A3 = Mar
etc
A12 = Dec

Then:

=SUM(CHOOSE(MATCH(C1,Months,0),Jan2005.355,Feb2005 .355,etc.,etc.,Dec2005.355))

Or:

=SUM(CHOOSE(MATCH(C1,A1:A12,0),Jan2005.355,Feb2005 .355,etc.,etc.,Dec2005.355))

Biff

"DMDave" wrote in message
...
Hi Biff,
The named range is just a named range
=NS2005!$C$9,NS2005!$C$17,NS2005!$C$25,NS2005!$C$3 3,NS2005!$C$41

For some reason Excel isn't recognizing the result of the indirect as
a named range. No matter what I do it just returns a #REF.
Im stumped.
If I just use =SUM(Jan2005.355) it does return the correct answer but
I have to put in a variable to be able to change the month from Jan to
Feb to Mar etc...
Is there a possible alternative solution?

Thanks
Dave

On Sat, 6 May 2006 21:50:50 -0400, "Biff"
wrote:

Hi!

Is the named range just a named range:

Jan2005.355 refers to:

=Sheet1!$A$1:$A$10

Or, is the named range really a named formula (dynamic range):

Jan2005.355 refers to:

=OFFSET(Sheet1!$A$1,,,COUNTA(Sheet1!$A:$A))

If it's the latter, Indirect won't work.

Biff

"DMDave" wrote in message
. ..
Is there a way to identify to excel in that the following formula:
=SUM(INDIRECT(C1&"2005.355")),
this part INDIRECT(C1&"2005.355") is a named range in the wb?


Where c1=Jan
and,
the named range is Jan2005.355.

This refers to the same question I posted a few minutes ago if it will
help understand the question more.

Thanks
Dave






DMDave

How do you Identify text as a named range in excel
 
Biff, Thanks so much. That worked great!



On Sun, 7 May 2006 00:01:36 -0400, "Biff"
wrote:

The named range is just a named range
=NS2005!$C$9,NS2005!$C$17,NS2005!$C$25,NS2005!$C $33,NS2005!$C$41


That still won't work with Indirect because it's not a contiguous single
range reference . To Indirect, it's 5 separate arguments.

About the only thing I can think of is something like this:

=SUM(CHOOSE(MATCH(C1,{"Jan","Feb"},0),Jan2005.355 ,Feb2005.355))

This could be quite long if you have 12 named ranges, 1 for each month.

You can make it a little shorter by creating a named formula for the months:

Months
Refers to: ={"Jan","Feb","Mar",etc., etc., "Dec"}

Or, list the months in a range of cells:

A1 = Jan
A2 = Feb
A3 = Mar
etc
A12 = Dec

Then:

=SUM(CHOOSE(MATCH(C1,Months,0),Jan2005.355,Feb200 5.355,etc.,etc.,Dec2005.355))

Or:

=SUM(CHOOSE(MATCH(C1,A1:A12,0),Jan2005.355,Feb200 5.355,etc.,etc.,Dec2005.355))

Biff

"DMDave" wrote in message
.. .
Hi Biff,
The named range is just a named range
=NS2005!$C$9,NS2005!$C$17,NS2005!$C$25,NS2005!$C$3 3,NS2005!$C$41

For some reason Excel isn't recognizing the result of the indirect as
a named range. No matter what I do it just returns a #REF.
Im stumped.
If I just use =SUM(Jan2005.355) it does return the correct answer but
I have to put in a variable to be able to change the month from Jan to
Feb to Mar etc...
Is there a possible alternative solution?

Thanks
Dave

On Sat, 6 May 2006 21:50:50 -0400, "Biff"
wrote:

Hi!

Is the named range just a named range:

Jan2005.355 refers to:

=Sheet1!$A$1:$A$10

Or, is the named range really a named formula (dynamic range):

Jan2005.355 refers to:

=OFFSET(Sheet1!$A$1,,,COUNTA(Sheet1!$A:$A))

If it's the latter, Indirect won't work.

Biff

"DMDave" wrote in message
...
Is there a way to identify to excel in that the following formula:
=SUM(INDIRECT(C1&"2005.355")),
this part INDIRECT(C1&"2005.355") is a named range in the wb?


Where c1=Jan
and,
the named range is Jan2005.355.

This refers to the same question I posted a few minutes ago if it will
help understand the question more.

Thanks
Dave





Biff

How do you Identify text as a named range in excel
 
You're welcome. Thanks for the feedback!

Biff

"DMDave" wrote in message
...
Biff, Thanks so much. That worked great!



On Sun, 7 May 2006 00:01:36 -0400, "Biff"
wrote:

The named range is just a named range
=NS2005!$C$9,NS2005!$C$17,NS2005!$C$25,NS2005!$ C$33,NS2005!$C$41


That still won't work with Indirect because it's not a contiguous single
range reference . To Indirect, it's 5 separate arguments.

About the only thing I can think of is something like this:

=SUM(CHOOSE(MATCH(C1,{"Jan","Feb"},0),Jan2005.35 5,Feb2005.355))

This could be quite long if you have 12 named ranges, 1 for each month.

You can make it a little shorter by creating a named formula for the
months:

Months
Refers to: ={"Jan","Feb","Mar",etc., etc., "Dec"}

Or, list the months in a range of cells:

A1 = Jan
A2 = Feb
A3 = Mar
etc
A12 = Dec

Then:

=SUM(CHOOSE(MATCH(C1,Months,0),Jan2005.355,Feb20 05.355,etc.,etc.,Dec2005.355))

Or:

=SUM(CHOOSE(MATCH(C1,A1:A12,0),Jan2005.355,Feb20 05.355,etc.,etc.,Dec2005.355))

Biff

"DMDave" wrote in message
. ..
Hi Biff,
The named range is just a named range
=NS2005!$C$9,NS2005!$C$17,NS2005!$C$25,NS2005!$C$3 3,NS2005!$C$41

For some reason Excel isn't recognizing the result of the indirect as
a named range. No matter what I do it just returns a #REF.
Im stumped.
If I just use =SUM(Jan2005.355) it does return the correct answer but
I have to put in a variable to be able to change the month from Jan to
Feb to Mar etc...
Is there a possible alternative solution?

Thanks
Dave

On Sat, 6 May 2006 21:50:50 -0400, "Biff"
wrote:

Hi!

Is the named range just a named range:

Jan2005.355 refers to:

=Sheet1!$A$1:$A$10

Or, is the named range really a named formula (dynamic range):

Jan2005.355 refers to:

=OFFSET(Sheet1!$A$1,,,COUNTA(Sheet1!$A:$A))

If it's the latter, Indirect won't work.

Biff

"DMDave" wrote in message
m...
Is there a way to identify to excel in that the following formula:
=SUM(INDIRECT(C1&"2005.355")),
this part INDIRECT(C1&"2005.355") is a named range in the wb?


Where c1=Jan
and,
the named range is Jan2005.355.

This refers to the same question I posted a few minutes ago if it will
help understand the question more.

Thanks
Dave








All times are GMT +1. The time now is 07:34 PM.

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