PC Review


Reply
Thread Tools Rate Thread

Change lookup range depending on result of 2nd lookup

 
 
sab_ya
Guest
Posts: n/a
 
      7th Mar 2008
Hi,

am trying to vary the name of the lookup range depending o the result
of a 2nd lookup --
NYC =vlookup(A1,range1,4,0)
LA =vlookup(B1,range2,4,0)
..
..
..
SFO =vlookup(C1,rangeXXX,4,0)

Rather than having to manually edit the ranges I would prefer excel to
lookup the ranges by something like

NYC =vlookup(A1,vlookup(A1,RangeTable,2,0),4,0)

RangeTable:

NYC range1
LA range2
SFO rangeXXX

Have tried to nest two vlookups as above but am having no luck

Any suggestions?

Thanks,
sab_ya
 
Reply With Quote
 
 
 
 
Tyro
Guest
Posts: n/a
 
      7th Mar 2008
Of course not. You're saying lookup a value in a single value returned from
the interior vlookup and get the result from the 4th column of the single
value. I'm not proposing an answer. Just presenting this to you to think
about..

Tyro

"sab_ya" <(E-Mail Removed)> wrote in message
news:270b221f-0620-4d48-960d-(E-Mail Removed)...
> Hi,
>
> am trying to vary the name of the lookup range depending o the result
> of a 2nd lookup --
> NYC =vlookup(A1,range1,4,0)
> LA =vlookup(B1,range2,4,0)
> .
> .
> .
> SFO =vlookup(C1,rangeXXX,4,0)
>
> Rather than having to manually edit the ranges I would prefer excel to
> lookup the ranges by something like
>
> NYC =vlookup(A1,vlookup(A1,RangeTable,2,0),4,0)
>
> RangeTable:
>
> NYC range1
> LA range2
> SFO rangeXXX
>
> Have tried to nest two vlookups as above but am having no luck
>
> Any suggestions?
>
> Thanks,
> sab_ya



 
Reply With Quote
 
Henn Sarv
Guest
Posts: n/a
 
      7th Mar 2008
You can play with functions like

Indirect
Offset

for example - the 1st lookup gives You name of range to use in 2nd lookup
and the name is converted to range using Indirect

check Help for closer hints

Henn

"sab_ya" <(E-Mail Removed)> kirjutas sõnumis
news:270b221f-0620-4d48-960d-(E-Mail Removed)...
> Hi,
>
> am trying to vary the name of the lookup range depending o the result
> of a 2nd lookup --
> NYC =vlookup(A1,range1,4,0)
> LA =vlookup(B1,range2,4,0)
> .
> .
> .
> SFO =vlookup(C1,rangeXXX,4,0)
>
> Rather than having to manually edit the ranges I would prefer excel to
> lookup the ranges by something like
>
> NYC =vlookup(A1,vlookup(A1,RangeTable,2,0),4,0)
>
> RangeTable:
>
> NYC range1
> LA range2
> SFO rangeXXX
>
> Have tried to nest two vlookups as above but am having no luck
>
> Any suggestions?
>
> Thanks,
> sab_ya


 
Reply With Quote
 
sab_ya
Guest
Posts: n/a
 
      10th Mar 2008
Thanks Henn, INDIRECT does the job!
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lookup value and control depends on lookup result aw Microsoft Access Form Coding 1 14th May 2010 08:53 PM
lookup help. lookup result based on data in 2 columns lcc Microsoft Excel Worksheet Functions 3 6th Apr 2010 01:20 PM
Join 2 Lists - Lookup value in 1 list & use result in 2nd lookup =?Utf-8?B?SkJ1c2g=?= Microsoft Excel Worksheet Functions 0 6th Dec 2006 11:24 PM
Lookup the latest date in a range so it appears as my result =?Utf-8?B?RkJC?= Microsoft Excel Misc 1 4th Dec 2004 03:50 AM
Lookup a result where value to find is between a range of values Phil Microsoft Excel Worksheet Functions 2 30th Aug 2004 03:35 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:29 AM.