Vlookup dynamically changes for different ranges

I have a vlookup that needs to look at different tables.

Is there any way to automatically change the range it looks up, without if 
lloops.  So if you put a 1 in cell A1 it would look up the first range, 2 the 
second range and so on.  I tried using choose but this did not work.

Thanks
0
Jeff1 (635)
9/27/2004 5:23:05 PM
excel.misc 78881 articles. 5 followers. Follow

2 Replies
413 Views

Similar Articles

[PageSpeed] 30

You need the INDIRECT() function. Look in HELP for details; if you can't 
sort it out, post again!

-- 

Kind Regards,

Niek Otten

Microsoft MVP - Excel

"Jeff" <Jeff@discussions.microsoft.com> wrote in message 
news:5BD4B0B0-BD49-402F-BEC3-DF7DE68D2E55@microsoft.com...
>I have a vlookup that needs to look at different tables.
>
> Is there any way to automatically change the range it looks up, without if
> lloops.  So if you put a 1 in cell A1 it would look up the first range, 2 
> the
> second range and so on.  I tried using choose but this did not work.
>
> Thanks 


0
nicolaus (2022)
9/27/2004 6:11:19 PM
One way (for 1 to 3):

=VLOOKUP(A2,CHOOSE(A1,INDIRECT("sheet1!a1:b999"),
                      INDIRECT("sheet2!a1:b999"),
                      INDIRECT("sheet3!A1:b999")),2,FALSE)
(all one cell)

Jeff wrote:
> 
> I have a vlookup that needs to look at different tables.
> 
> Is there any way to automatically change the range it looks up, without if
> lloops.  So if you put a 1 in cell A1 it would look up the first range, 2 the
> second range and so on.  I tried using choose but this did not work.
> 
> Thanks

-- 

Dave Peterson
ec35720@msn.com
0
ec35720 (10082)
9/27/2004 11:03:21 PM
Reply:

Similar Artilces: