Solved

Challenging Lookup (VLookup and HLookup combined ??)

Posted on 2013-01-31
4
319 Views
Last Modified: 2013-01-31
I need some help with a challenging lookup formula.  It might (not sure though) require to combine VLookup and HLookup.

See data example below:

******************************
LookUp Source:

Label        10    20   30
Range_A   75    85   90
Range_B   X1    X2   X3

******************************

Actual Data

                Col A     Col B               Looked-Up Value
Row 1     15        Range_A             "75"  (why this value... see explanation below)
Row 2     29        Range_B             "X2"  (why this value... see explanation below)
Row 3     30        Range_A             "90"  (why this value... see explanation below)

******************************

Explanation:

Why "75" for Row 1:  
o Value of 15 in A1 (Actual Data) is less than 20 Label (Lookup Source).  
o Therefore, values under "10" (either 75 or X1) are considered.
o Given "Range_A" in B1 (Actual Data), we selected 75 (Lookup Source).
 
Why "X2" for Row 2:  
o Value of 29 in A2 (Actual Data) is less than 30 Label (Lookup Source).  
o Therefore, values under "20" (either 85 or X2) are considered.
o Given "Range_B" in B2 (Actual Data), we selected X2 (Lookup Source).
 
Why "90" for Row 3:  
o Value of 30 in A3 (Actual Data) equals 30 Label (Lookup Source).  
o Therefore, values under "30" (either 90 or X3) are considered.
o Given "Range_A" in B3 (Actual Data), we selected 90 (Lookup Source).


Hope this makes sense... see attached XLS for data.

Thanks,
EEH
Lookup-and-Actual-Data.xlsx
0
Comment
Question by:ExpExchHelp
  • 2
4 Comments
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 38839913
It would be something like

=INDEX(Sheet2!$B$2:$D$3,MATCH(A1,Sheet2!$B$1:$D$1),MATCH(B1,Sheet2!$A$2:$A$3,0))
0
 
LVL 26

Accepted Solution

by:
redmondb earned 500 total points
ID: 38839932
Hi, ExpExchHelp.

Please see attached. The formula could be cleaner if you're using Excel 2007 or later.

(The code is fundamentally the same as ssaqibh, but I'd done the work, so...)

Regards,
Brian.
2D-Match.xls
0
 

Author Closing Comment

by:ExpExchHelp
ID: 38840791
PERFECT SOLUTION!!!    Thanks so much for the prompt response.   8)
0
 
LVL 26

Expert Comment

by:redmondb
ID: 38840876
Thanks, ExpExchHelp. (Apologies,  ssaqibh.)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now