A Microsoft Excel forum. ExcelBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ExcelBanter forum » Excel Newsgroups » Excel Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Tags: ,

Dependent dropdowns



 
 
Thread Tools Display Modes
  #1  
Old February 4th 10, 06:08 AM posted to microsoft.public.excel.worksheet.functions
Dave
external usenet poster
 
Posts: 1,140
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.
Ads
  #2  
Old February 4th 10, 07:30 AM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,708
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  
Old February 4th 10, 08:31 AM posted to microsoft.public.excel.worksheet.functions
Dave
external usenet poster
 
Posts: 1,140
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  
Old February 6th 10, 08:41 AM posted to microsoft.public.excel.worksheet.functions
Dave
external usenet poster
 
Posts: 1,140
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  
Old February 9th 10, 02:25 AM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,708
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.

>>
>>
>> .
>>



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PivotChart Dropdowns hwy_star Charts and Charting in Excel 0 March 18th 09 03:09 PM
using dropdowns Vineet Excel Discussion (Misc queries) 1 January 9th 07 08:46 PM
Working with dropdowns...please help Nico Excel Discussion (Misc queries) 1 January 10th 06 12:40 AM
DropDowns Dharsh Excel Discussion (Misc queries) 2 April 28th 05 12:34 PM
Dropdowns Carl Hilton Excel Discussion (Misc queries) 1 March 11th 05 06:15 PM


All times are GMT +1. The time now is 04:58 PM.


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