Calculate bulk rebate (if possible in certain periode)

axelg

New Member
Joined
Jan 21, 2016
Messages
42
Office Version
  1. 365
Platform
  1. Windows
I would like to calculate a "bulk" rebate.

They way I need this to happend is that once you have bought more then eg. 5 times a product you get a 10% discount as of the 6th (not on the onces lower then 6) product. Once you buy more the eg.10 times the same product. (etc)

So I was thinking of using a formula like =SWITCH(COUNTIF(B:B;B2);<5;"no rebate";COUNTIF(B:B;B2);<10;5%;.....)

But problem I see there is that this will also change the older inputs I made.

So is there a way to make it so that the first eg 5 times it encounters product A it stays unchanged for those ones, between 5 and 10 unchanged, ect.

It woul be even better if I could combine that with the date . As then I could count only within a specific period.... (eg in first QRT I did 12 times product A. The first 5 should be full price, 5 to 10 should have a rebate of 5% and the last 2 should have 10% rebate. Next Quarter we start the count again. But all is in one table....



DateProductrebate
01/05/2022​
A?
30/04/2022​
A?
20/02/2021​
B?
03/06/2022​
C
15/06/2022​
B
01/05/2022​
A
30/04/2022​
B
20/02/2021​
A
03/06/2022​
C
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
What you want is not difficult. Upload a sample Data using XL2BB. Also may I suggest to update your current Excel version in your profile. Though it may not be needed in relevance to this question. But while resolving you never know where you get stuck and then Excel Version can matter.
 
Upvote 0
Book1.xlsx
ABCDEFGHIJKLMNOPQRSTUV
1IDNAMECPETAIN REBATEMONTH INSEA INRIVER INSHIFTRIVER OUTSEA OUTPILOT REBATETONNAGE REBATEGTTONNAGE FEEPILOT FEE
2105ASKHOLMENTCP01/01/2022YES1307,19 €169,21 €0,00 €169,21 €307,19 €952,80 €11.551$ 300,00$ 300,00Tonnage rebateBaseline5
314SONGA SAPPHIREVCP01/01/2022YES1323,64 €178,34 €0,00 €178,34 €323,64 €1.003,96 €11.472$ 300,00$ 300,00
415SONGA JADEVCP02/01/2022YES1323,64 €178,34 €0,00 €178,34 €323,64 €1.003,96 €13.465$ 300,00$ 300,00
58ESSEX STARTCP02/01/2022YES1323,64 €178,34 €0,00 €178,34 €323,64 €1.003,96 €12.137$ 300,00$ 300,00
632YASA SWANVCP03/01/2022YES1552,24 €307,19 €0,00 €307,19 €552,24 €1.718,86 €29.681$ 300,00$ 300,00
7208CAROLINE ATCP03/01/2022YES1143,92 €77,67 €0,00 €77,67 €143,92 €443,18 €3.364$ 300,00$ 300,00
822LEON ZEUSTCP03/01/2022YES1503,35 €279,62 €0,00 €279,62 €503,35 €1.565,94 €25.864$ 300,00$ 300,00
9330FRANCES WONSILDTCP04/01/2022YES1108,13 €57,87 €0,00 €57,87 €108,13 €332,00 €2.349$ 300,00$ 300,00
106ERICUSA MTCP07/01/2022YES1323,64 €178,34 €0,00 €178,34 €323,64 €1.003,96 €11.393$ 300,00$ 300,00
11CV2311WHITCHALLENGERTCP09/01/2022YES1143,92 €77,67 €0,00 €77,67 €143,92 €443,18 €5.815$ 300,00$ 300,00
12331FRANCES WONSILDTCP11/01/2022YES1108,13 €57,87 €0,00 €57,87 €108,13 €332,00 €2.349$ 300,00$ 300,00
1326BOCHEM LONDONTCP11/01/2022YES1355,93 €196,62 €236,00 €196,62 €355,93 €1.341,10 €12.136$ 300,00$ 300,00
1410ESSEX STARTCP13/01/2022YES1323,64 €178,34 €0,00 €178,34 €323,64 €1.003,96 €12.137$ 300,00$ 300,00
15209CAROLINE ATCP18/01/2022YES1143,92 €77,67 €0,00 €77,67 €143,92 €443,18 €3.364$ 300,00$ 300,00
16332FRANCES WONSILDTCP18/01/2022YES1108,13 €57,87 €0,00 €57,87 €108,13 €332,00 €2.349$ 300,00$ 300,00
17LINERSTEN BALTICVCP20/01/2022YES10,000,00 €11.943$ 300,00$ 300,00
181OVERSEAS SUN COASTVCP20/01/2022YES1552,24 €307,19 €0,00 €552,24 €307,19 €1.718,86 €30.229$ 300,00$ 300,00
19CV2312WHITCHALLENGERTCP21/01/2022YES1143,92 €77,67 €0,00 €77,67 €143,92 €443,18 €5.815$ 300,00$ 300,00
2011ESSEX STARTCP21/01/2022YES1323,64 €178,34 €0,00 €178,34 €323,64 €1.003,96 €12.137$ 300,00$ 300,00
211STAVANGER POSEIDONVCP24/01/2022YES1552,24 €307,19 €0,00 €307,19 €552,24 €1.718,86 €29.914$ 300,00$ 300,00
228ERICUSA MTCP24/01/2022YES1323,64 €178,34 €0,00 €187,63 €339,78 €1.029,39 €11.393$ 300,00$ 300,00
23107ASKHOLMENTCP25/01/2022YES1307,19 €169,21 €0,00 €323,64 €178,34 €978,38 €11.551$ 300,00$ 300,00
24333FRANCES WONSILDTCP25/01/2022YES1108,13 €57,87 €0,00 €57,87 €108,13 €332,00 €2.349$ 300,00$ 300,00
2512ESSEX STARTCP26/01/2022YES1323,64 €178,34 €0,00 €178,34 €323,64 €1.003,96 €12.137$ 300,00$ 300,00
26210CAROLINE ATCP26/01/2022YES1143,92 €77,67 €0,00 €77,67 €143,92 €443,18 €3.364$ 300,00$ 300,00
27CV2313WHITCHALLENGERTCP26/01/2022YES1143,92 €77,67 €0,00 €77,67 €143,92 €443,18 €5.815$ 300,00$ 300,00
285THEMSESTERNVCP27/01/2022YES1372,37 €206,06 €0,00 €206,06 €372,37 €1.156,86 €14.400$ 300,00$ 300,00
299ERICUSA MTCP30/01/2022YES1339,78 €187,63 €0,00 €187,63 €339,78 €1.054,82 €11.393$ 300,00$ 300,00
3013ESSEX STARTCP30/01/2022YES1323,64 €178,34 €0,00 €178,34 €323,64 €1.003,96 €12.137$ 300,00$ 300,00
31334FRANCES WONSILDTCP31/01/2022YES1108,13 €57,87 €0,00 €57,87 €108,13 €332,00 €2.349$ 300,00$ 300,00
32108ASKHOLMENTCP01/02/2022YES2307,19 €169,21 €0,00 €169,21 €307,19 €952,80 €11.551$ 300,00$ 300,00
331PACIFIC JADETCP02/02/2022YES20,00 €0,00 €0,00 €307,19 €552,24 €859,43 €29.476$ 300,00$ 300,00
345FURE FLADENVCP03/02/2022YES2323,64 €178,34 €0,00 €178,34 €323,64 €1.003,96 €11.377$ 300,00$ 300,00
351NORD VALKYRIEVCP03/02/2022YES2535,79 €298,05 €0,00 €298,05 €535,79 €1.667,68 €29.539$ 300,00$ 300,00
3692AN HAI WAN TCP05/02/2022YES2208,96 €114,07 €0,00 €114,07 €208,96 €646,06 €0$ 300,00$ 300,00
37CV2315WHITCHALLENGERTCP07/02/2022YES2143,92 €77,67 €0,00 €0,00 €0,00 €221,59 €5.815$ 300,00$ 300,00
Sheet1
Cell Formulas
RangeFormula
F2:F37F2=MONTH('https://mcsfm-my.sharepoint.com/personal/axgi_mcs_be/Documents/Klanten/Tony/Dashboard/[EXXON REBATE axel.xlsx]REBATE 22'!$E2)
L2:L37L2=SUM(G2:K2)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A1:P37Cell Value="GENT"textNO
A1:P37Cell Value="NO"textNO
A1:P37Cell Value="received"textNO
A1:P37Cell Value="n/a"textNO
A1:P37Cell Value="not received"textNO
 
Upvote 0
It's the Yellow column. There I baasically want the sum (G:L) / V2 but the V2 has extra rebates if a name from B appears more then x times, and again more than Y times. But the previous results should stay.
If this could be don with time stamp even better eg. Jan baseline = 5, feb baseline = 6,...

Book1.xlsx
ABCDEFGHIJKLMNOPQRSTU
1IDNAMECPETAIN REBATEMONTH INSEA INRIVER INSHIFTRIVER OUTSEA OUTPILOT REBATETONNAGE REBATEGTTONNAGE FEEPILOT FEE
2105ASKHOLMENTCP01/01/2022YES1307,19 €169,21 €0,00 €169,21 €307,19 €952,80 €11.551$ 300,00$ 300,00Tonnage rebateBaseline
314SONGA SAPPHIREVCP01/01/2022YES1323,64 €178,34 €0,00 €178,34 €323,64 €1.003,96 €11.472$ 300,00$ 300,00
415SONGA JADEVCP02/01/2022YES1323,64 €178,34 €0,00 €178,34 €323,64 €1.003,96 €13.465$ 300,00$ 300,00
58ESSEX STARTCP02/01/2022YES1323,64 €178,34 €0,00 €178,34 €323,64 €1.003,96 €12.137$ 300,00$ 300,00
632YASA SWANVCP03/01/2022YES1552,24 €307,19 €0,00 €307,19 €552,24 €1.718,86 €29.681$ 300,00$ 300,00
7208CAROLINE ATCP03/01/2022YES1143,92 €77,67 €0,00 €77,67 €143,92 €443,18 €3.364$ 300,00$ 300,00
822LEON ZEUSTCP03/01/2022YES1503,35 €279,62 €0,00 €279,62 €503,35 €1.565,94 €25.864$ 300,00$ 300,00
9330FRANCES WONSILDTCP04/01/2022YES1108,13 €57,87 €0,00 €57,87 €108,13 €332,00 €2.349$ 300,00$ 300,00
106ERICUSA MTCP07/01/2022YES1323,64 €178,34 €0,00 €178,34 €323,64 €1.003,96 €11.393$ 300,00$ 300,00
11CV2311WHITCHALLENGERTCP09/01/2022YES1143,92 €77,67 €0,00 €77,67 €143,92 €443,18 €5.815$ 300,00$ 300,00
12331FRANCES WONSILDTCP11/01/2022YES1108,13 €57,87 €0,00 €57,87 €108,13 €332,00 €2.349$ 300,00$ 300,00
1326BOCHEM LONDONTCP11/01/2022YES1355,93 €196,62 €236,00 €196,62 €355,93 €1.341,10 €12.136$ 300,00$ 300,00
1410ESSEX STARTCP13/01/2022YES1323,64 €178,34 €0,00 €178,34 €323,64 €1.003,96 €12.137$ 300,00$ 300,00
15209CAROLINE ATCP18/01/2022YES1143,92 €77,67 €0,00 €77,67 €143,92 €443,18 €3.364$ 300,00$ 300,00
16332FRANCES WONSILDTCP18/01/2022YES1108,13 €57,87 €0,00 €57,87 €108,13 €332,00 €2.349$ 300,00$ 300,00
17LINERSTEN BALTICVCP20/01/2022YES10,000,00 €11.943$ 300,00$ 300,00
181OVERSEAS SUN COASTVCP20/01/2022YES1552,24 €307,19 €0,00 €552,24 €307,19 €1.718,86 €30.229$ 300,00$ 300,00
19CV2312WHITCHALLENGERTCP21/01/2022YES1143,92 €77,67 €0,00 €77,67 €143,92 €443,18 €5.815$ 300,00$ 300,00
2011ESSEX STARTCP21/01/2022YES1323,64 €178,34 €0,00 €178,34 €323,64 €1.003,96 €12.137$ 300,00$ 300,00
211STAVANGER POSEIDONVCP24/01/2022YES1552,24 €307,19 €0,00 €307,19 €552,24 €1.718,86 €29.914$ 300,00$ 300,00
228ERICUSA MTCP24/01/2022YES1323,64 €178,34 €0,00 €187,63 €339,78 €1.029,39 €11.393$ 300,00$ 300,00
23107ASKHOLMENTCP25/01/2022YES1307,19 €169,21 €0,00 €323,64 €178,34 €978,38 €11.551$ 300,00$ 300,00
24333FRANCES WONSILDTCP25/01/2022YES1108,13 €57,87 €0,00 €57,87 €108,13 €332,00 €2.349$ 300,00$ 300,00
2512ESSEX STARTCP26/01/2022YES1323,64 €178,34 €0,00 €178,34 €323,64 €1.003,96 €12.137$ 300,00$ 300,00
26210CAROLINE ATCP26/01/2022YES1143,92 €77,67 €0,00 €77,67 €143,92 €443,18 €3.364$ 300,00$ 300,00
27CV2313WHITCHALLENGERTCP26/01/2022YES1143,92 €77,67 €0,00 €77,67 €143,92 €443,18 €5.815$ 300,00$ 300,00
285THEMSESTERNVCP27/01/2022YES1372,37 €206,06 €0,00 €206,06 €372,37 €1.156,86 €14.400$ 300,00$ 300,00
299ERICUSA MTCP30/01/2022YES1339,78 €187,63 €0,00 €187,63 €339,78 €1.054,82 €11.393$ 300,00$ 300,00
3013ESSEX STARTCP30/01/2022YES1323,64 €178,34 €0,00 €178,34 €323,64 €1.003,96 €12.137$ 300,00$ 300,00
31334FRANCES WONSILDTCP31/01/2022YES1108,13 €57,87 €0,00 €57,87 €108,13 €332,00 €2.349$ 300,00$ 300,00
32108ASKHOLMENTCP01/02/2022YES2307,19 €169,21 €0,00 €169,21 €307,19 €952,80 €11.551$ 300,00$ 300,00
331PACIFIC JADETCP02/02/2022YES20,00 €0,00 €0,00 €307,19 €552,24 €859,43 €29.476$ 300,00$ 300,00
345FURE FLADENVCP03/02/2022YES2323,64 €178,34 €0,00 €178,34 €323,64 €1.003,96 €11.377$ 300,00$ 300,00
351NORD VALKYRIEVCP03/02/2022YES2535,79 €298,05 €0,00 €298,05 €535,79 €1.667,68 €29.539$ 300,00$ 300,00
3692AN HAI WAN TCP05/02/2022YES2208,96 €114,07 €0,00 €114,07 €208,96 €646,06 €0$ 300,00$ 300,00
37CV2315WHITCHALLENGERTCP07/02/2022YES2143,92 €77,67 €0,00 €0,00 €0,00 €221,59 €5.815$ 300,00$ 300,00
Sheet1
Cell Formulas
RangeFormula
F2:F37F2=MONTH([@ETA])
L2:L37L2=SUM(G2:K2)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A1:P37Cell Value="GENT"textNO
A1:P37Cell Value="NO"textNO
A1:P37Cell Value="received"textNO
A1:P37Cell Value="n/a"textNO
A1:P37Cell Value="not received"textNO
 
Upvote 0
Sorry for the late response, I was bit occupied. Check Column M & N - Is this is what you were looking for...
  • the previous results should stay.
  • If this could be don with time stamp even better eg. Jan baseline = 5, feb baseline = 6,...

All Records.xlsb
ABCDEFGHIJKLMNOPQR
1IDNAMECPETAIN REBATEMONTH INSEA INRIVER INSHIFTRIVER OUTSEA OUTPILOT REBATERebateOld RebateTONNAGE REBATEGTTONNAGE FEEPILOT FEE
2105ASKHOLMENTCP44562YES1307.19169.210169.21307.19952.80%11551300300
314SONGA SAPPHIREVCP44562YES1323.64178.340178.34323.641003.960%11472300300
415SONGA JADEVCP44563YES1323.64178.340178.34323.641003.960%13465300300
58ESSEX STARTCP44563YES1323.64178.340178.34323.641003.960%12137300300
632YASA SWANVCP44564YES1552.24307.190307.19552.241718.860%29681300300
7208CAROLINE ATCP44564YES1143.9277.67077.67143.92443.180%3364300300
822LEON ZEUSTCP44564YES1503.35279.620279.62503.351565.940%25864300300
9330FRANCES WONSILDTCP44565YES1108.1357.87057.87108.133320%2349300300
106ERICUSA MTCP44568YES1323.64178.340178.34323.641003.960%11393300300
11CV2311WHITCHALLENGERTCP44570YES1143.9277.67077.67143.92443.180%5815300300
12331FRANCES WONSILDTCP44572YES1108.1357.87057.87108.133320%2349300300
1326BOCHEM LONDONTCP44572YES1355.93196.62236196.62355.931341.10%12136300300
1410ESSEX STARTCP44574YES1323.64178.340178.34323.641003.960%12137300300
15209CAROLINE ATCP44579YES1143.9277.67077.67143.92443.180%3364300300
16332FRANCES WONSILDTCP44579YES1108.1357.87057.87108.133320%2349300300
17LINERSTEN BALTICVCP44581YES1000%11943300300
181OVERSEAS SUN COASTVCP44581YES1552.24307.190552.24307.191718.860%30229300300
19CV2312WHITCHALLENGERTCP44582YES1143.9277.67077.67143.92443.180%5815300300
2011ESSEX STARTCP44582YES1323.64178.340178.34323.641003.960%12137300300
211STAVANGER POSEIDONVCP44585YES1552.24307.190307.19552.241718.860%29914300300
228ERICUSA MTCP44585YES1323.64178.340187.63339.781029.390%11393300300
23107ASKHOLMENTCP44586YES1307.19169.210323.64178.34978.380%11551300300
24333FRANCES WONSILDTCP44586YES1108.1357.87057.87108.133320%2349300300
2512ESSEX STARTCP44587YES1323.64178.340178.34323.641003.960%12137300300
26210CAROLINE ATCP44587YES1143.9277.67077.67143.92443.180%3364300300
27CV2313WHITCHALLENGERTCP44587YES1143.9277.67077.67143.92443.180%5815300300
285THEMSESTERNVCP44588YES1372.37206.060206.06372.371156.860%14400300300
299ERICUSA MTCP44591YES1339.78187.630187.63339.781054.820%11393300300
3013ESSEX STARTCP44591YES1323.64178.340178.34323.641003.960%12137300300
31334FRANCES WONSILDTCP44592YES1108.1357.87057.87108.133320%2349300300
32108ASKHOLMENTCP44593YES2307.19169.210169.21307.19952.80%11551300300
331PACIFIC JADETCP44594YES2000307.19552.24859.430%29476300300
345FURE FLADENVCP44595YES2323.64178.340178.34323.641003.960%11377300300
351NORD VALKYRIEVCP44595YES2535.79298.050298.05535.791667.680%29539300300
3692AN HAI WAN TCP44597YES2208.96114.070114.07208.96646.060%0300300
37CV2315WHITCHALLENGERTCP44599YES2143.9277.67000221.590%5815300300
Sheet1
Cell Formulas
RangeFormula
L2:L37L2=SUM(G2:K2)
M2:M37M2=LET(VCnt,COUNTIFS($B$1:B2,B2,$F$1:F2,F2),IFS(N2<>"",N2,OR(AND(F2=1,VCnt<5),AND(F2=2,VCnt<6)),0,VCnt<10,5%))
F2:F37F2=MONTH(D2)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
M:NOther TypeColor scaleNO
 
Upvote 0
You rreply is very swift; Will have to leave now but will take a look next week to it.

Alrady many thanks
 
Upvote 0

Forum statistics

Threads
1,214,648
Messages
6,120,726
Members
448,987
Latest member
marion_davis

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