Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default vlookup, change aray if

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default vlookup, change aray if

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?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default vlookup, change aray if

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?

  #4   Report Post  
Posted to microsoft.public.excel.programming
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?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting contents in aray jpreman Excel Discussion (Misc queries) 7 October 16th 08 02:11 PM
VLOOKUP Question - Can I Keep the Same Aray with Drag? CJ Excel Worksheet Functions 4 July 22nd 08 08:41 PM
filling an aray without looping [email protected] Excel Programming 1 June 9th 05 05:49 PM
Passing a string aray as an argument to a function ?....Help! Dan Thompson Excel Programming 5 September 29th 04 03:01 AM
Named Aray Formula Francois Benadie Excel Programming 2 December 4th 03 07:16 AM


All times are GMT +1. The time now is 03:40 PM.

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

About Us

"It's about Microsoft Excel"