View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.newusers
dpatte601
 
Posts: n/a
Default VLOOKUP and Multi Lists

Subject: VLOOKUP and Multi Lists

need help with this dropdown multi list with vlookup.
B1 is the dropdown list (on sheet named Data) that holds 4 lists (ad,
el, mr, sz) this are lists that hold the codes for group names (TB =The
Beatles BD= Bob Dylan..so on) each list has different number of rows.
I have Colum A on the Main sheet linked to the Above drop down, so that
if AD is selected in B1 then in A5 the dropdown list is AD and if B1 is
MR then A5 drop down is changed to MR. this part works good. Now the
problem,

I want colum C to show the Group name depending on what colum A has in
it.(I have the List setup and can get it to work (sort of) I have 2 ways
to do this now. The first works but only if the formula is changed to
match the colum A selection. This takes 4 different formulas

1. =VLOOKUP(A5,ad:Data!E2,5,FALSE)
2. =VLOOKUP(A5,el:Data!F2,5,FALSE)
3. =VLOOKUP(A5,mr:Data!G2,5,FALSE)
4. =VLOOKUP(A5,sz:Data!H2,5,FALSE)

but it is to much work to put in different formulas if 1 would do the
trick.So I changed it to look like this:

1. =IF($B$1="ad",(VLOOKUP(A5,ad:Data!E2,5,FALSE)),IF( $B$1="el",VLOOKUP
(A5,el:Data!F2,5,FALSE)))

2. =IF($B$1="mr",(VLOOKUP(A5,mr:Data!G2,5,FALSE)),IF( $B$1="sz",VLOOKUP
(A5,sz:Data!H2,5,FALSE)))

now it takes 2 to do this the best I could do was have 3 lists in 1 of
the above formulas (I can always change the lists to be 3 insted of 4
so this is not the issue) Heres the problem:

If A6 is TB then C6 is The Beatles.
but if I change the List in B1 to say EL so I can select EP in A7 so
Elvis Prestly shows up in C7 : then the Text in C6 changes to false.

What I am looking for is what can I do to keep the last selection from
changing every time I add new selection in a cell.