A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

VLOOKUP Range



 
 
Thread Tools Display Modes
  #1  
Old September 27th, 2008, 05:59 AM posted to microsoft.public.excel.worksheet.functions
apb000
external usenet poster
 
Posts: 1
Default VLOOKUP Range

Is there a way to have excel look up data that falls BETWEEN two numbers,
i.e. in a range, and return a specified character string? For example, "If
(value) is between B12 and B13, return "Tuesday"". I could always do it with
IF THEN statements, of course, but I'd have to make A LOT of them, and they'd
be huge, elaborate statements. Can't I just do it from a table of values?
  #2  
Old September 27th, 2008, 06:07 AM posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom
external usenet poster
 
Posts: 3,232
Default VLOOKUP Range

You can create a table, put the numbers in ascending order and use VLOOKUP

see help for further explanation

http://www.contextures.com/xlFunctions02.html






--


Regards,


Peo Sjoblom



"apb000" wrote in message
...
Is there a way to have excel look up data that falls BETWEEN two numbers,
i.e. in a range, and return a specified character string? For example, "If
(value) is between B12 and B13, return "Tuesday"". I could always do it
with
IF THEN statements, of course, but I'd have to make A LOT of them, and
they'd
be huge, elaborate statements. Can't I just do it from a table of values?



  #3  
Old September 27th, 2008, 06:39 AM posted to microsoft.public.excel.worksheet.functions
ShaneDevenshire
external usenet poster
 
Posts: 2,232
Default VLOOKUP Range

Hi,

Create a lookup table, in say range D1:E3, such as:
0 Mon
10 Tue
30 Wed

in cell A1 enter a value like 20, in A2 enter the formula
=VLOOKUP(A1,D1:E3,2,1)

The lookup table must be sorted in Ascending order on the first column
because we are doing an approximate match. You can shorten the above formula
to
=VLOOKUP(A1,D1:E3,2)

--
Thanks,
Shane Devenshire


"apb000" wrote:

Is there a way to have excel look up data that falls BETWEEN two numbers,
i.e. in a range, and return a specified character string? For example, "If
(value) is between B12 and B13, return "Tuesday"". I could always do it with
IF THEN statements, of course, but I'd have to make A LOT of them, and they'd
be huge, elaborate statements. Can't I just do it from a table of values?

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:18 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.