View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
ToddEZ ToddEZ is offline
external usenet poster
 
Posts: 60
Default vlookup, change aray if

I found the problem- I need to type a ' in front of the sheet name.

Thanks!

"ToddEZ" wrote:

I am geeting a REF error. It seems to be resulting from the the indirect
function... any suggestions. Thanks.

=VLOOKUP(A7, INDIRECT(VLOOKUP(G7, 'Lookup Table'!A:B, 2, FALSE)), 5, FALSE)
where the lookup returns: k & rel m Correctn w earnng!$A:$AO

"Tom Ogilvy" wrote:

Are you using the indirect function with the results of the table lookup

=Vlookup(A1,Indirect(vlookup(A2,Table,2,False)),2, False)

Where A2 holds the ID and the inner Lookup returns something like

sheet2!A:C




--
Regards,
Tom Ogilvy


"ToddEZ" wrote:

I have data in about 8 different sheets. I am creating a master sheet that
consolidates some of the data from the 8 sheets (while keeping active
links/vlookups to the data). I would like to change my vlookup array based
on the "ID number". For example, if id number="abc", then vlookup(a1,
sheet1!A:C, 2, false), if id number =xzy, then vlookup(a1, sheet2A:C, 3,
false). The problem is that I have 24 different ID's (hence arrays) to lto
work with. I tossed around the idea of creating a reference table for the
IDs/Arrays, and doing a lookup to find the array within the lookup to grab
the data, but it dosen't seem to work. Anyone know of a good way to do this?