You are here:

Excel/vlookup using a range


Im sorry I wasn't very clear. I would like to use a vlookup function to be able to return a letter representing each range that the value in table 1 represents. So for table 1 the first value is 0.34018 I would like to write a vlookup function that returns the letter representing that range which is B. for the second value in table 1 I would like the vlookup function to return the letter A because the number falls in the range A represents (0, 0.2]

Table 1
1    0.340180122
2    0.070161957
3    0.34460476
4    0.192905209
5    0.476292604
6    0.187060013
7    0.165919327

Table 2
name       bottom    top
A          0         0.2
B          0.2       0.4
C          0.4       0.6
D          0.6       0.8
E          0.8       1


Assume Table 1 starts in A2 with the value 0.340180122

assume table 2 starts in M2
M2: A
N2: 0
O2: 0.2

In B2 I put this formula

entered with Ctrl+shift+Enter rather than just enter since it is an array formula.

I then drag filled it down column B.  

It returned the following result which appears to be correct:

0.340180122   B
0.070161957   A
0.34460476   B
0.192905209   A
0.476292604   C
0.187060013   A
0.165919327   A

Tom Ogilvy

About Excel
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


All Answers

Answers by Expert:

Ask Experts


Tom Ogilvy


Selected as an Excel MVP by Microsoft since 1999. Answering Excel questions in Allexperts since its inception in 2001. Able to answer questions on almost all aspects of Excel's internal capabilities. If seeking a VBA solution, please specify that in your question itself so I give you the answer you want. [Excel has weak protection - if you are distributing an application, I don't answer questions on how to protect your project from your users.]


Extensive experience.

Master of Science (MS) degree Operations Research (ORSA)

Awards and Honors
Microsoft MVP in Excel.

©2016 All rights reserved.