You are here:

Excel/Two Dimensional Lookup

Question
I have a question that I have regarding a value lookup in excel.

Ex.
y/x      5      10      15       20      .....
A       .3       .4      .5      .6
B       .4       .5      .6      n/a
C       .5       .6      .7      n/a
D        n/a     .7      .8      n/a
...

I have an array set up above.  I have a y value lets say "B" and a number ".5"

What would be the best function to look up for the "x" value? (Which in this case will end with the result of (10))

On top of that, instead of .5, I have a value of .38, and I need it to round up to the next highest number TO .5 (Same "B", Same result of 10)

I need to be able to pick the "y" value from the list, and referencing that ".5", be able to get the output of "x" (which is 10)

Sorry for my english.

If your "y/x" is in cell A1, then this formula will do the exact match:
It assumes the lookup values, B and .5, are in A10 and A11:
=INDEX(1:1,MATCH(A11,OFFSET(A1,MATCH(A10,A:A,0)-1,0,1,100),0))

I don't understand how you can round .38 up to .5, however. .4, yes maybe, but .5???
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

Bob Umlas

Expertise

I`m a Microsoft Excel MVP (Most Valuable Professional) and have been since the inception of the program in 1995. I can answer every kind of Excel question except: API, Importing/exporting to other programs (powerpoint, word,...) Also check out my in-person training link at http://www.thumbtack.com/ny/new-york/excel-training/

Experience

Worked with MS Excel since version 0.99 (on the Mac!). Was contributing editor to Excellence Magazine, having written >300 articles. John Walkenbach said of me "I finally met someone who knows as much about Excel as I do."

Publications
Excellence, The Expert, Microsoft

Education/Credentials
BA in math, Hofstra University, 1965

Awards and Honors
MVP
Led sessions for the Convergence 2004-2006 seminar on Excel tips & tricks