Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

using Vlookup and Hlookup in a spreadsheet 2

Status
Not open for further replies.

rugbyboy123

Civil/Environmental
Oct 11, 2008
16
hello everybody,

I have a value (6) in a cell and i want to look it up in a table

1 4
2 11
3 9
4 6
5 3

i want the program to look up 6 and then give the value 4 in another cell

how would one go about this

rugbyboy123
 
Replies continue below

Recommended for you

Why do you think reading an explanation here is going to be better than reading an explanation from Excel help?

-handleman, CSWP (The new, easy test)
 
Your columns are in the wrong order to use VLOOKUP. (Presumably this is why you are asking the question.)

Use the MATCH function on your second column to find the entry you are seeking. If your first column is always sequential from unity, then that is your answer.

If on the other hand your first column cannot be assumed to be simply the sequential integers, and just looks that way because you entered your example in great haste, then you need to use the result from the above MATCH function as the row reference into an application of the INDEX function to the first column. Try the two operations separately first, and once you understand them individually you can combine them into the one formula.
 
The attached spreadsheet uses the following formula
=OFFSET(valuerange,MATCH(6,valuerange,0)-1,-1,1,1)
where valuerange refers to the 2nd column of your example


=====================================
Eng-tips forums: The best place on the web for engineering discussions.
 
 http://files.engineering.com/getfile.aspx?folder=3f453231-16b0-410a-859f-f49c2f6888aa&file=leftlookup.xls
thats great thank u very much for your help electricpete

regards

rugbyboy123
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor