Database similarity

Giganews Newsgroups
Subject: Database similarity
Posted by:  dranon (dranon@dranon.invalid.net)
Date: Mon, 02 Mar 2009

I need to lookup a value based on a looked up value.  Can this be done
in Excel?  Example cell contents (range P1:R5) [I hope this is
readable]-

=0                              =""  =""
=IF(Q2=Q1,P1,P1+1)[result is 1] ABC  Hello
=IF(Q3=Q2,P2,P2+1)[result is 1] ABC  Goodbye
=IF(Q4=Q3,P3,P3+1)[result is 2] XYZ  Jump
=IF(Q5=Q4,P4,P4+1)[result is 2] XYZ  Sit

Second range (Y1:Y2) also defined name PickListOne

=VLOOKUP(ROW(),$Q$2:$R$5,2,0)[Result is ABC]
=VLOOKUP(ROW(),$Q$2:$R$5,2,0)[Result is XYZ]

Pick Lists:

a1: Validation Allow=List, =PickListOne [This lets me choose between
ABC and XYZ]
a2: ???????????????????????????????????????????????

What can I put in a2 so that I can pick from "Hello" or "Goodbye" if
a1 is "ABC" or pick from "Jump" or "Sit" if a1 is "XYZ"?

Yes, I know I should do this in Access.  Alas, that is not an option.

Thanks

Replies