Testing for number in multiple ranges

knuckbo

New Member
Joined
Feb 3, 2016
Messages
2
Help Please!!! I am stumped!

Been using Excel for years and Lotus 123 even before that, but I'm stumped. I always thought I was pretty proficient, but guess not. Here's what I'm struggling with:

I need to bill some clients based on some usage of services. They are charged based on tiers. For example,

Tier 1: 0 - 8 Bill 10 cents per unit
Tier 2: 9 - 24 Bill 12 cents per unit
Tier 3: 25 - 36 Bill 15 cents per unit
Tier 4: 37 & up Bill 25 cents per unit

So, let's say I have a client that uses 33 units, I would bill the first 8 units at 10 cents, the second 16 units at 12 cents, and the remaining 9 units at 15 cents per unit.

Of course, if I can extract out the property units by tier, I can do the basic formula to bill and produce an invoice, but it's having my sheet automatically calculate the amounts by tiers that's had me stumped for a couple of weeks now.

Any help would be appreciated.
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
In A2:A5 I have typed in Tier 1 - Tier 5
B1 is a header That says Number with B2:B5 being the numbers to lookup. i.e. 0,9,25, and 37.
The resulting billing values are in C2:C5 with .1,.12,.15,.25.

I put your example number of 33 in cell E1.

The following formula will give you your total.

Code:
=SUMPRODUCT(LOOKUP(ROW(INDIRECT("1:"&E1)),$B$2:$B$5,$C$2:$C$5))
 
Upvote 0
Wow...Thank you. It worked like magic. I have been racking my brain for al long time trying to use "If" function. I guess I need to learn more about arrays. Again, thank you!
 
Upvote 0

Forum statistics

Threads
1,223,996
Messages
6,175,864
Members
452,678
Latest member
will_simmo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top