Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,388
Default Dependent dropdowns

Hi,
XL2003
I have many named ranges in my workbook. Relevent ones a
"Components" "ResTH" (without the quotes).

On my worksheet:
Cell A2, Data Validation dropdown, List source = "Components". From this
list, I select "Res"

Cell B2, Data Validation dropdown, List = TH,SMT. From this list I select "TH"

Cell C2, Data Validation dropdown, List source = INDIRECT(A2&B2). From this
list I can choose items from the ResTH named range.

This works well as long as the ResTH named range is just an ordinary range:
=Data!$V$3:$V$10

However, I would like to change ResTH to a dynamic named range:
=OFFSET(Data!$V$3,0,0,COUNTA(Data!$V$3:$V$100),1)

But when I do, the dropdown in Col C is empty.
Is this a limitation, or am I doing something wrong?

Thanks in advance
Dave.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Dependent dropdowns

Is this a limitation

Not so much a limitation as it is a problem with certain functions. Namely,
INDIRECT. The reference passed to INDIRECT *must* be a text representation
of a valid reference. Using OFFSET to define the dynamic range doesn't
create a valid TEXT representation that INDIRECT can use so =INDIRECT(...)
is evaluating to a #REF! error and thereby not allowing the drop down to
operate.

See these for alternatives:

http://contextures.com/xlDataVal02.html

http://contextures.com/xlDataVal15.html

If you can't get either of those methods to work post back. I know of
another method but it's limited to a specific number of named ranges that
can be referenced.

--
Biff
Microsoft Excel MVP


"Dave" wrote in message
...
Hi,
XL2003
I have many named ranges in my workbook. Relevent ones a
"Components" "ResTH" (without the quotes).

On my worksheet:
Cell A2, Data Validation dropdown, List source = "Components". From this
list, I select "Res"

Cell B2, Data Validation dropdown, List = TH,SMT. From this list I select
"TH"

Cell C2, Data Validation dropdown, List source = INDIRECT(A2&B2). From
this
list I can choose items from the ResTH named range.

This works well as long as the ResTH named range is just an ordinary
range:
=Data!$V$3:$V$10

However, I would like to change ResTH to a dynamic named range:
=OFFSET(Data!$V$3,0,0,COUNTA(Data!$V$3:$V$100),1)

But when I do, the dropdown in Col C is empty.
Is this a limitation, or am I doing something wrong?

Thanks in advance
Dave.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,388
Default Dependent dropdowns

Thanks Biff,
I'll look at that and let you know.
Regards - Dave.

"T. Valko" wrote:

Is this a limitation


Not so much a limitation as it is a problem with certain functions. Namely,
INDIRECT. The reference passed to INDIRECT *must* be a text representation
of a valid reference. Using OFFSET to define the dynamic range doesn't
create a valid TEXT representation that INDIRECT can use so =INDIRECT(...)
is evaluating to a #REF! error and thereby not allowing the drop down to
operate.

See these for alternatives:

http://contextures.com/xlDataVal02.html

http://contextures.com/xlDataVal15.html

If you can't get either of those methods to work post back. I know of
another method but it's limited to a specific number of named ranges that
can be referenced.

--
Biff
Microsoft Excel MVP


"Dave" wrote in message
...
Hi,
XL2003
I have many named ranges in my workbook. Relevent ones a
"Components" "ResTH" (without the quotes).

On my worksheet:
Cell A2, Data Validation dropdown, List source = "Components". From this
list, I select "Res"

Cell B2, Data Validation dropdown, List = TH,SMT. From this list I select
"TH"

Cell C2, Data Validation dropdown, List source = INDIRECT(A2&B2). From
this
list I can choose items from the ResTH named range.

This works well as long as the ResTH named range is just an ordinary
range:
=Data!$V$3:$V$10

However, I would like to change ResTH to a dynamic named range:
=OFFSET(Data!$V$3,0,0,COUNTA(Data!$V$3:$V$100),1)

But when I do, the dropdown in Col C is empty.
Is this a limitation, or am I doing something wrong?

Thanks in advance
Dave.



.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,388
Default Dependent dropdowns

Hi Biff,
I looked at both the links you sent, but still couldn't figure out how to
concatonate the values of 2 cells, which themselves were derived from dynamic
lists, to make a name for a third dropdown.
So I went back to non-dynamic named ranges, but used a sheet-change event
macro to re-define any named range that was modified.
This worked well.

Private Sub Worksheet_Change(ByVal Target As Range)
If Cells(2, Target.Column) = "" Then Exit Sub
A = Target.Column
B = Cells(100, A).End(xlUp).Row
ActiveWorkbook.Names.Add Name:=Cells(2, A), RefersTo:=Range(Cells(3, A),
Cells(B, A))
End Sub

Regards - Dave.


"T. Valko" wrote:

Is this a limitation


Not so much a limitation as it is a problem with certain functions. Namely,
INDIRECT. The reference passed to INDIRECT *must* be a text representation
of a valid reference. Using OFFSET to define the dynamic range doesn't
create a valid TEXT representation that INDIRECT can use so =INDIRECT(...)
is evaluating to a #REF! error and thereby not allowing the drop down to
operate.

See these for alternatives:

http://contextures.com/xlDataVal02.html

http://contextures.com/xlDataVal15.html

If you can't get either of those methods to work post back. I know of
another method but it's limited to a specific number of named ranges that
can be referenced.

--
Biff
Microsoft Excel MVP


"Dave" wrote in message
...
Hi,
XL2003
I have many named ranges in my workbook. Relevent ones a
"Components" "ResTH" (without the quotes).

On my worksheet:
Cell A2, Data Validation dropdown, List source = "Components". From this
list, I select "Res"

Cell B2, Data Validation dropdown, List = TH,SMT. From this list I select
"TH"

Cell C2, Data Validation dropdown, List source = INDIRECT(A2&B2). From
this
list I can choose items from the ResTH named range.

This works well as long as the ResTH named range is just an ordinary
range:
=Data!$V$3:$V$10

However, I would like to change ResTH to a dynamic named range:
=OFFSET(Data!$V$3,0,0,COUNTA(Data!$V$3:$V$100),1)

But when I do, the dropdown in Col C is empty.
Is this a limitation, or am I doing something wrong?

Thanks in advance
Dave.



.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Dependent dropdowns

Good deal. Thanks for feeding back!

--
Biff
Microsoft Excel MVP


"Dave" wrote in message
...
Hi Biff,
I looked at both the links you sent, but still couldn't figure out how to
concatonate the values of 2 cells, which themselves were derived from
dynamic
lists, to make a name for a third dropdown.
So I went back to non-dynamic named ranges, but used a sheet-change event
macro to re-define any named range that was modified.
This worked well.

Private Sub Worksheet_Change(ByVal Target As Range)
If Cells(2, Target.Column) = "" Then Exit Sub
A = Target.Column
B = Cells(100, A).End(xlUp).Row
ActiveWorkbook.Names.Add Name:=Cells(2, A), RefersTo:=Range(Cells(3, A),
Cells(B, A))
End Sub

Regards - Dave.


"T. Valko" wrote:

Is this a limitation


Not so much a limitation as it is a problem with certain functions.
Namely,
INDIRECT. The reference passed to INDIRECT *must* be a text
representation
of a valid reference. Using OFFSET to define the dynamic range doesn't
create a valid TEXT representation that INDIRECT can use so
=INDIRECT(...)
is evaluating to a #REF! error and thereby not allowing the drop down to
operate.

See these for alternatives:

http://contextures.com/xlDataVal02.html

http://contextures.com/xlDataVal15.html

If you can't get either of those methods to work post back. I know of
another method but it's limited to a specific number of named ranges that
can be referenced.

--
Biff
Microsoft Excel MVP


"Dave" wrote in message
...
Hi,
XL2003
I have many named ranges in my workbook. Relevent ones a
"Components" "ResTH" (without the quotes).

On my worksheet:
Cell A2, Data Validation dropdown, List source = "Components". From
this
list, I select "Res"

Cell B2, Data Validation dropdown, List = TH,SMT. From this list I
select
"TH"

Cell C2, Data Validation dropdown, List source = INDIRECT(A2&B2). From
this
list I can choose items from the ResTH named range.

This works well as long as the ResTH named range is just an ordinary
range:
=Data!$V$3:$V$10

However, I would like to change ResTH to a dynamic named range:
=OFFSET(Data!$V$3,0,0,COUNTA(Data!$V$3:$V$100),1)

But when I do, the dropdown in Col C is empty.
Is this a limitation, or am I doing something wrong?

Thanks in advance
Dave.



.



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
PivotChart Dropdowns hwy_star Charts and Charting in Excel 0 March 18th 09 02:09 PM
using dropdowns Vineet Excel Discussion (Misc queries) 1 January 9th 07 07:46 PM
Working with dropdowns...please help Nico Excel Discussion (Misc queries) 1 January 9th 06 11:40 PM
DropDowns Dharsh Excel Discussion (Misc queries) 2 April 28th 05 12:34 PM
Dropdowns Carl Hilton Excel Discussion (Misc queries) 1 March 11th 05 05:15 PM


All times are GMT +1. The time now is 09:24 PM.

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"