Price by Volume Formula

Jon von der Heyden

MrExcel MVP, Moderator
Joined
Apr 6, 2004
Messages
10,907
Office Version
  1. 365
Platform
  1. Windows
Hi there

I am struggling to create a formula to calculate the price per transaction.

Each row in this table is a transaction. The cost is calculated based on the cumulative volume for each customer. Price banding as follows:

Excel Workbook
AB
3Volume >Price
4 - 3.12
5 1,000 2.85
6 5,000 2.58
7 10,000 2.31
8 20,000 2.04
9 35,000 1.77
10 50,000 1.50
11 65,000 1.23
12 80,000 0.96
13 100,000 0.69
14 125,000 0.41
Prices


So for e.g row7 Cust3, the 1st 999 should be charged at £3.12, and then the remaining 586 should be charged at £2.85. The calculation should be based on the cumulative volume and not the transaction volume.

Any help GREATLY appreciated. :)
Book4
ABCD
1CustVolumeCumPrice
2Cust116541654?
3Cust111062760
4Cust111393899
5Cust238783878
6Cust215395417
7Cust315851585
8Cust128526751
9Cust112498000
10Cust118129812
11Cust217957212
12Cust2299510207
13Cust334054990
14Cust1203711849
15Cust1374415593
16Cust1362619219
17Cust2369613903
18Cust2157615479
19Cust312066196
20Cust1178221001
21Cust1116222163
22Cust168622849
23Cust2275418233
24Cust2328821521
25Cust3381610012
26Cust1125524104
27Cust151824622
28Cust185725479
29Cust2106822589
30Cust2188524474
Sheet1
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Thanks Barry

I've been looking at your MEDIAN combo formula suggestion in the challenge of the month "Tricky Commission Formula" trying desperately to figure out if I could adapt it for my needs. :biggrin:

I'll have a read of this and give it a shot.

Thanks muchly!
 
Upvote 0
Well, here's my contribution (I hope it works - I evaluated it for the first couple of examples):

Excel Workbook
ABCDEFGHI
13Volume >PriceDifferenceCum Difference
2403.1200CustVolumeCumPrice
359992.85-0.27-0.27Cust1165416544983.63
464,9992.58-0.27-0.54Cust1110627603152.1
579,9992.31-0.27-0.81Cust1113938993246.15
6819,9992.04-0.27-1.08Cust23878387811322.03
7934,9991.77-0.27-1.35Cust2153954174160.43
81049,9991.5-0.27-1.62Cust3158515854786.98
91164,9991.23-0.27-1.89Cust1285267517182.12
101279,9990.96-0.27-2.16Cust1124980002885.19
111399,9990.69-0.27-2.43Cust1181298124185.72
1214124,9990.41-0.28-2.71Cust2179572124146.45
13Cust22995102076749.97
14Cust3340549909704.25
15Cust12037118493206.97
16Cust13744155935616
17Cust13626192195439
18Cust23696139035544
19Cust21576154792364
20Cust3120661962790.72
21Cust11782210011590.84
22Cust1116222163488.04
23Cust168622849288.12
24Cust22754182334131
25Cust23288215213288.24
26Cust33816100128804.43
27Cust1125524104527.1
28Cust151824622217.56
29Cust185725479359.94
30Cust2106822589448.56
31Cust2188524474791.7
Sheet1


Copy I4 down as far as required.
 
Upvote 0
Ta Rich! Will also have a look at this...

In the meantime Barry's solution has worked a treat. Well worth reading the article! :biggrin:
 
Upvote 0

Forum statistics

Threads
1,215,329
Messages
6,124,302
Members
449,150
Latest member
NyDarR

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