P
Paul
I have used the method described on Debra Dalgleish's web site to create
data validation in column B that is dependent on what is entered in column
A.
So, column A is validated by a list, the source of which is =list1
The name "list1" is defined by the equation
=Sheet2!$A$2:$A$21
These cells contains "item1", "item2" and so on.
Column B is validated by a list, the source of which is =INDIRECT(A1)
The name "item1" is defined by the equation
=Sheet2!$B$2:$B$21
and the name "item2" is defined by the equation
=Sheet2!$C$2:$C$21
and so on.
All of this works fine. I get a drop-down box in A1 and make a selection. I
then get a drop-down box in B1 with entries that depend on the value chosen
for A1.
However, the length of each of these lists will vary from 3 up to 20
entries, and such entries will be added and deleted as time goes by. The
result is that the drop-down list is long, perhaps containing many blanks. I
wanted to make the length dynamic so that only genuine entries are shown.
I changed the definition of the name "list1" to
=OFFSET(Sheet2!$A$1,1,0,COUNTA(Sheet2!$A$2:$A$21),1)
and this works perfectly for validation in column A.
I then changed the definition of the name "item1" to
=OFFSET(Sheet2!$B$1,1,0,COUNTA(Sheet2!$B$2:$B$21),1)
and this is where I encountered a problem.
If I select "item1" in A1, no drop-down box appears in B1 when I click the
down-arrow. If I select "item2" (which is still defined by the fixed range),
a drop-down box appears as expected.
Can anyone explain this, or better still tell me how to fix the problem?
Thanks in anticipation.
data validation in column B that is dependent on what is entered in column
A.
So, column A is validated by a list, the source of which is =list1
The name "list1" is defined by the equation
=Sheet2!$A$2:$A$21
These cells contains "item1", "item2" and so on.
Column B is validated by a list, the source of which is =INDIRECT(A1)
The name "item1" is defined by the equation
=Sheet2!$B$2:$B$21
and the name "item2" is defined by the equation
=Sheet2!$C$2:$C$21
and so on.
All of this works fine. I get a drop-down box in A1 and make a selection. I
then get a drop-down box in B1 with entries that depend on the value chosen
for A1.
However, the length of each of these lists will vary from 3 up to 20
entries, and such entries will be added and deleted as time goes by. The
result is that the drop-down list is long, perhaps containing many blanks. I
wanted to make the length dynamic so that only genuine entries are shown.
I changed the definition of the name "list1" to
=OFFSET(Sheet2!$A$1,1,0,COUNTA(Sheet2!$A$2:$A$21),1)
and this works perfectly for validation in column A.
I then changed the definition of the name "item1" to
=OFFSET(Sheet2!$B$1,1,0,COUNTA(Sheet2!$B$2:$B$21),1)
and this is where I encountered a problem.
If I select "item1" in A1, no drop-down box appears in B1 when I click the
down-arrow. If I select "item2" (which is still defined by the fixed range),
a drop-down box appears as expected.
Can anyone explain this, or better still tell me how to fix the problem?
Thanks in anticipation.