Using Lookup with GT and LT Columns

B

billbrandi

I have an array with 3 columns; (1) column A is labeled less than or equal to
and contains the lower range of values; (2) column B is labeled greater than
or equal to and contains the upper range of values; (3) column C is a
discrete value. There are over 500 rows in my array in a continuous
sequence. Example, row 1 is 0,10,[value], row 2 is 11,20,[value, row 3 is
21, 30,[value].

I want to do a lookup on the array using a separate file that has 2 columns.
Column A has a value to match with the range in each row of the array and
column B has a value to be returned.

How would I do this in Excel? I am familiar with a 2 column vlookup but
have never tried it with ranges.

Thanks
Bill
 
S

ShaneDevenshire

Hi Bill,

It doesn't sound like you need a two column VLOOKUP, you just need to do an
approximate match rather than an exact match:

=VLOOKUP(A1,[Book2]Sheet1!$A$2:$C$13,2,TRUE)

You are looking up the value in cell A1 in the range A2:A13 of the second
workbook, where that column is sorted in ascending order. You are bringing
back the item in column 2 of that range. TRUE means approximate. You can
also use 1 instead of TRUE or you can even leave the argument out:

=VLOOKUP(A1,[Book2]Sheet1!$A$2:$C$13,2)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top