SumProduct with multiple tables

dustyjay16

New Member
Joined
Mar 17, 2014
Messages
4
I have found out, thanks to you wonderful people, how to use SumProduct formulas. Now I have a new question. What would be the best way to use the sumproduct formula for tiered pricing, if you have several different sets of tiers. For instance what if you have 5 customers and each of them has their own set of tiers. If you had each set of tiers set up on a different tab, how could you then use a formula to calculate the total cost of each transaction based on whichever customer it is. It seems like it would be a vlookup mixed with a sumproduct.
Customer
Gallons
Total Cost
1
26
???
2
22
3
37
1
42
2
33

<tbody>
</tbody>
Customer 1 Tiers
0 - 20
$5 each
> 20
$3 each
Customer 2 Tiers
0 - 10
$5 each
10 - 20
$4 each
> 20
$3 each
Customer 3 Tiers
0 - 10
$7 each
10 - 30
$5 each
> 30
$4 each

<tbody>
</tbody>
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Create a specific range for each customer (type) on a sheet called Admin.

Customer 1

0 - 10, 0, $7
> 20, 20, $3

Select A1:C2, name the selection Type1.

Follow the same logic of 3-column ranges for Type2 and Type3.

Now go the data sheet, including the procesing area in A:C...

C2, just enter and copy down:

=LOOKUP(B2,INDIRECT("Type"&A2))*B2
 
Upvote 0
I do appreciate your response. I see how that could lookup the table that I'm looking for. However, I need the table to look up the formula, and THEN use the cell referenced of total gallons to calculate total dollars based on that number. So I not only need it to find the table, but also to calculate with a sumproduct formula based on the table.
 
Upvote 0
I do appreciate your response. I see how that could lookup the table that I'm looking for. However, I need the table to look up the formula, and THEN use the cell referenced of total gallons to calculate total dollars based on that number. So I not only need it to find the table, but also to calculate with a sumproduct formula based on the table.

Customer
GallonsTotal CostUnit cost


0
0 - 20$5
1262043


20> 20$3
2
221653





3
371484


00 - 10$5
1422043


1010-20$4
2331653


20> 20$3

















00 - 10$7







1010-30$5







30> 30$4

<tbody>
</tbody>

C2, copied down:

=SUMPRODUCT(--($A$2:$A$6=A2),$B$2:$B$6,$D$2:$D$6)

D2, copied down:

=LOOKUP(B2,INDIRECT("Type"&A2))

See:

https://dl.dropboxusercontent.com/u/65698317/dustyjay16.xlsx
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,561
Members
449,089
Latest member
Motoracer88

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