Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default look-up in a range

A1 is a user-entered value for # of employees.

I have a 35 row tiered rate sheet based on number of employees. What
is the best way to look-up A1 and match it to the correct range-row.

Ex:

A1=33

1-10 $5
11-15 $8
16-30 $12
31-50 $15

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default look-up in a range

Setup your table so that the leftmost column contains the *lower boundary*
of the tier:

...........A..........B
10......1...........5
11......11.........8
12......16.........12
13......31.........15

Then...

A1 = 33

=LOOKUP(A1,A10:B13)

--
Biff
Microsoft Excel MVP


"Jimmy" wrote in message
...
A1 is a user-entered value for # of employees.

I have a 35 row tiered rate sheet based on number of employees. What
is the best way to look-up A1 and match it to the correct range-row.

Ex:

A1=33

1-10 $5
11-15 $8
16-30 $12
31-50 $15

Thanks!



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default look-up in a range

In your table (which I'll assume is A2:B5), change the left column to these
values:

1
11
16
31

Now your lookup formula is simply:
=LOOKUP(A2,A2:B5)
You don't state what you want to happen though if its outside those ranges.
You could change your table to this to accomodate:

0 "Too small"
1 $5
11 $8
16 $12
31 $15
51 "Too big"

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Jimmy" wrote:

A1 is a user-entered value for # of employees.

I have a 35 row tiered rate sheet based on number of employees. What
is the best way to look-up A1 and match it to the correct range-row.

Ex:

A1=33

1-10 $5
11-15 $8
16-30 $12
31-50 $15

Thanks!

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,276
Default look-up in a range

Hi,
=IF(A131,B8,IF(AND(A115,A1<31),B7,B6))

"Jimmy" wrote:

A1 is a user-entered value for # of employees.

I have a 35 row tiered rate sheet based on number of employees. What
is the best way to look-up A1 and match it to the correct range-row.

Ex:

A1=33

1-10 $5
11-15 $8
16-30 $12
31-50 $15

Thanks!

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default look-up in a range

Hi,

I like the LOOKUP suggestion best, but if you don't want to create a lookup
table then you could use

=LOOKUP(A1,{1,5;11,8;16,12;31,15})

and the reason to use LOOKUP instead of VLOOKUP, which also works, is that
your first column, the lookup column is sorted ascending so you get away with
a shorter formula. The VLOOKUP formula would be

VLOOKUP(A1,D7:E10,2)
or
=VLOOKUP(A1,{1,5;11,8;16,12;31,15},2)

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Jimmy" wrote:

A1 is a user-entered value for # of employees.

I have a 35 row tiered rate sheet based on number of employees. What
is the best way to look-up A1 and match it to the correct range-row.

Ex:

A1=33

1-10 $5
11-15 $8
16-30 $12
31-50 $15

Thanks!



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default look-up in a range

Hi,

I ment to add this to my previous discussion. Suppose you want to keep your
lookup table with the entries like 1-10 in the first column. Suppose your
lookup table is in the range C1:D30 then

=SUMPRODUCT(LOOKUP(A1,--LEFT(C1:C30,FIND("-",1:C30)-1),D1:D30))

or the array equivalent

=LOOKUP(A1,--LEFT(C1:C30,FIND("-",1:C30)-1),D1:D30)

array - means you must press Shift+Ctrl+Enter to enter the formula

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Jimmy" wrote:

A1 is a user-entered value for # of employees.

I have a 35 row tiered rate sheet based on number of employees. What
is the best way to look-up A1 and match it to the correct range-row.

Ex:

A1=33

1-10 $5
11-15 $8
16-30 $12
31-50 $15

Thanks!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cond. Format Data Bars of range based on values of another range alexmo Excel Worksheet Functions 4 January 16th 09 04:03 AM
Excel Addin:Setting the range to the Excel.Range object range prop Rp007 Excel Worksheet Functions 5 November 24th 06 04:30 PM
Selecting range in list of range names depending on a cell informa Courreges Excel Discussion (Misc queries) 2 June 19th 06 10:59 AM
formula to sort a range so that it matches the exact rows of a column that is outside that range? steveo Excel Discussion (Misc queries) 1 June 18th 06 02:05 AM
How to count dates within a certain range in a column with mutiple date range entries Krisjhn Excel Worksheet Functions 2 September 1st 05 01:59 PM


All times are GMT +1. The time now is 12:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"