How to lookup a value

excelos

Well-known Member
Joined
Sep 25, 2011
Messages
591
Office Version
  1. 365
Platform
  1. Windows
Hello

In the below, how can I lookup the first row for a particular letter X and then the second row for another value XX and then return the value below XX ?
E.g. let's say I want to return the value under B and then under BC, i.e. 6.
I would prefer to avoid OFFSET and also not to rely on empty cells as they can be filled.
Last, using INDEX to return the position of the first lookup and then use that to limit the next lookup array is a bit messy.
Would any lookup search mode (next smallest/largest etc) could work with text?

Thanks!

AB
AAABBBBC
1​
3​
5​
6​
2​
4​
7​
8​
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
A lot of members have looked at your thread but no suggestions. The implication is likely that your question is not clear enough.

Perhaps another (slightly larger & slightly different) set of sample data and the expected result together with explaining in a different way might help.
 
Upvote 0
How about this
Book1
ABCDEFGHIJKLM
1ABTable ColumnRowTable Range
2AAABBBBCBBC2A1
31356B2
424786AA1
5AB2
6BB1
7BC2
8
Sheet2
Cell Formulas
RangeFormula
G4G4=INDEX(CHOOSE(XLOOKUP(G2,K2:K7,L2:L7),A,B),I2,XLOOKUP(G2,K2:K7,L2:L7))
Named Ranges
NameRefers ToCells
A=Sheet2!$A$2:$B$4G4
B=Sheet2!$D$2:$E$4G4
 
Upvote 0
Thanks, I am pasting again below (unfortunately I cannot install anything here, if it was possible to insert the excel in the webpage, it would have been great):

Table1Table2Table3Table4
Row1Col1Col2Col1Col2Col1Col2Col1Col2
Row2
6​
74​
50​
62​
13​
41​
33​
77​
Row3
99​
90​
49​
77​
71​
21​
45​
31​


I want to lookup a specific Table then a specific Col and Row.
I cannot rely on gaps, empty cells or anything else, I only need to lookup Table names in 1:1, Row names in A:A and Col names in 2:2 but they have to correspond to the correct Table obviously.

In the past, I used to limit the lookup array by using INDEX as part of a cell range but this makes looks quite messy in the formula and difficult to interpret.

OFFSET also is not an option due to volatility.

Any idea?
 
Upvote 0

Forum statistics

Threads
1,215,026
Messages
6,122,738
Members
449,094
Latest member
dsharae57

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top