PC Review


Reply
Thread Tools Rate Thread

Data lookup function in Excel

 
 
=?Utf-8?B?S2ltIE0u?=
Guest
Posts: n/a
 
      6th Jul 2007
I am trying to create a function similar to VLOOKUP, but different. I have a
range of numbers, and I need the function to look at the starting number and
see if it is between, for example, 0 and 50 dollars, and if it is, return one
value. If it is between 50 and 100, another, etc. VLOOKUP doesn't do between,
just exact. What I am looking for is like what you do on your income tax
form, where you look for your wages between certain numbers. Does anyone
have a suggestion?
 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      6th Jul 2007

One simple way if not too many is to nest ifs starting the the highest.
=if(a1>100,1,if(a1>50,2,"no"))
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"Kim M." <Kim M.@discussions.microsoft.com> wrote in message
news:3C8A1503-A2F4-47D5-9D47-(E-Mail Removed)...
>I am trying to create a function similar to VLOOKUP, but different. I have
>a
> range of numbers, and I need the function to look at the starting number
> and
> see if it is between, for example, 0 and 50 dollars, and if it is, return
> one
> value. If it is between 50 and 100, another, etc. VLOOKUP doesn't do
> between,
> just exact. What I am looking for is like what you do on your income tax
> form, where you look for your wages between certain numbers. Does anyone
> have a suggestion?


 
Reply With Quote
 
Rick Rothstein \(MVP - VB\)
Guest
Posts: n/a
 
      6th Jul 2007
>I am trying to create a function similar to VLOOKUP, but different. I have
>a
> range of numbers, and I need the function to look at the starting number
> and
> see if it is between, for example, 0 and 50 dollars, and if it is, return
> one
> value. If it is between 50 and 100, another, etc. VLOOKUP doesn't do
> between,
> just exact. What I am looking for is like what you do on your income tax
> form, where you look for your wages between certain numbers. Does anyone
> have a suggestion?


If your intervals are all the same, you can divide by the interval amount,
add one to it, and use it as the index value in a CHOOSE function call.
Using your 50 unit interval example from your posting...

=CHOOSE(1+A1/50,Value1,Value2,Value3,Value4,Value5,<<etc.>>)

Rick

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Data Validation/Lookup function does function correcty Kirkey Microsoft Excel Worksheet Functions 2 25th May 2009 09:22 PM
function =IFERROR LOOKUP works in excel 2007 not in excel 2003 David Ryan Microsoft Excel Worksheet Functions 4 15th Apr 2009 03:25 PM
Data lookup function JL Taylor Microsoft Excel Worksheet Functions 2 16th Jul 2008 07:29 PM
AGAIN... I need another Lookup Function to extract some data BillReese Microsoft Excel Worksheet Functions 2 9th May 2006 12:26 AM
Excel worksheet function - Sort of LookUp Function - Help Needed iwtci Microsoft Excel Worksheet Functions 1 25th May 2004 11:14 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:35 AM.