Top 50 List using Formulas

davewatson86

New Member
Joined
Jul 8, 2019
Messages
30
Hello all

i have this formula :{=LARGE((ROUND('Customer Data'!$Q$2:$Q$5000,5)+ROW('Customer Data'!$Q$2:$Q$5000)/10000000),ROW(K3)-ROW($K$3)+1)}
this gives me a list of the top 50 spenders of a certain product group. (3 different groups all up so i have 3 different lists)

my problem is that based on the spending in the groups the customers earn rebates, however they cannot earn rebates in more than one group.

how can i modify this to generate the top 50 list while A. qualifying the customer is unique to that list and B. if not unique keep the customer in the list where the rebate value is highest and remove the customer from the list where the rebate is lower.

my data looks like this
ABOPQ
196102521Stephan Bmw£0.00£0.00-£1.92
197102525J Parker£0.00£0.00-£0.37
198102526Leeders Accident Centre Ltd-£0.48£4.35£142.10
199102527North Elmham Service Station-£22.42-£25.96-£15.50
200102528Dehn Services£0.00£0.00-£0.78
201102529M Morgan Motor Engineer Ltd£8.99-£7.09-£14.50
202102530Parkside Garage-£1.93-£3.09-£1.30
203102531Langor Bridge Garage£0.00£0.00-£2.48
204102532West Raynham Auto Clinic-£6.97£0.00-£2.51
205102533Colkirk Motors-£0.46£0.00-£2.53
206102534Howes Of Fakenham£0.00£0.00£0.00
207102535Coburn Vehicle Systems Ltd-£3.69£0.00-£1.82
208102536Major Tyres-£0.18-£4.31-£2.30
209102537Bell Motors-£1.21£0.00-£0.37
210102539Fakenham Auto Electrical£0.00£0.00£0.00
211102542R & M Eke Motor Engineers£9.29-£1.66£14.70
212102544Nick Massingham-£3.85-£1.68-£1.57
213102545Braggs Of Briston Ltd-£1.43£0.00-£7.98
214102546R And K Autos£0.00£0.00£0.00
215102548R M C-£6.88-£20.04-£15.83
216102553Aerolite Garage£2.88£0.00£33.07
217102554P J's£0.00£0.00£0.00
218102557Hjc Ltd (Home James)£0.00-£0.10-£12.34

<tbody>
</tbody>


My lists Look Like this
ABCDEFGHIJKLMN
1SPP Top 50MPP Top 50HCL Top 20
2#Account NumberAccount NameEstimated Reabate#Account NumberAccount NameEstimated Reabate#Account NumberAccount NameEstimated Reabate
31138066Stuart Wright Transport£98.391102676D C Last Vehicle Sales Ltd£218.721102329Cooper Norwich£245.93
42102697Brown & Sons (Loddon) Ltd£97.082187455Stebbings Car Centre Ltd£135.442102526Leeders Accident Centre Ltd£142.10
53102586Morters Garage£93.443106785L D AUTOVOGUE LTD£95.783102484Jamie's Accident Repair Centr£84.38
64212518Das Auto Norwich£79.054178478AFFORDABLE CARS LTD£82.914171007M J AUTOPARTS£73.79
75102703Yelverton Garage Ltd£65.465102329Cooper Norwich£76.645102703Yelverton Garage Ltd£73.71
86181692ANGLIA AUTOGAS£62.596102502W W Autos£71.386223411JO JO'S£70.26
97153600Wright Part Ltd£61.917250908K G B Transport£57.607245148Norfolk Sports£68.15
108156717Kings Lynn VW Centre Limited£56.578145204IMPERIAL COMMERICAL£44.828102359Motor Bodies£48.10
119185523Canary Guttering Service£52.119189460Auto-Tec£34.459235290Top Coat£47.77
1210206003Loddon Motortec£47.5510245253A B Autos£28.3110102510Terry's Engineering Services£43.25
1311215466Station Road Garage (Heacham)£41.4211106493Goldline Taxis£24.9211106785L D AUTOVOGUE LTD£37.51
1412242567Smart Refinish£38.5112156511LANGOR BRIDGE AUTOS£23.4912232979Hillcrest Vehicle Solutions L£36.37
1513102494M Rivett Mtrs£37.8213196253Caters Service Station£23.4713102553Aerolite Garage£33.07
1614241797Repps Garage (Norfolk) Ltd£37.1514122906Wensum Motor Company£22.9414213554A & S Bodyfix Ltd£22.15
1715245343Hagstrom Saab£36.7315102586Morters Garage£22.6715102297P A R Motors£21.45
1816181757CAR AUTOHAUS£35.7116154086EMG Motor Group Ltd£16.2316226541C S N Auto's Ltd.£21.16
1917112559M K Repairs Limited£34.6717218037Rob Palmer AutoTech£15.2917238208Jason Potts£18.99
2018175362A V S£34.3118225778Colin Hughes Auto Services£14.3818180100Simon Emms£17.91
2119239116Tec 41 ltd£30.8719147271JOHN AYERS CARS£10.8119106829Airport Carcare£16.85
2220106233A & M Motors£29.4020198022Auto-Mate£7.4220204534Can do Autocentres Ltd£16.52

<tbody>
</tbody>

obviously this is only a sample of the data as there are thousands of lines.

your help as always is greatly appreciated.

Dave
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Can the customer show up in column B more than once? I assume that columns O, P, Q are the estimated rebates for each group? And you want to base the inclusion in the result lists based on the sum of the totals in those columns for all the entries for a given customer in column B?

And I haven't really started designing anything yet, but it looks to be fairly complicated for formulas. Would you be amenable to helper columns if that would help?
 
Last edited:
Upvote 0
The customer in column a and b will not show up more than once, helper columns is no problem as I can just hide them off to the side.
Thank you for your help ?
 
Upvote 0
I was working through the steps I'd need to do to accomplish this, and I ended up adding the helper columns to the Data sheet. Consider this:


Book1
ABOPQRSTUVWX
1
2SPPMPPHCLSPPMPPHCLSPPMPPHCL
3102521Stephan Bmw00-1.92    
4102525J Parker00-0.37
5102526Leeders Accident Centre Ltd-0.484.35142.1142.11
6102527North Elmham Service Station-22.42-25.96-15.5
7102528Dehn Services00-0.78
8102529M Morgan Motor Engineer Ltd8.99-7.09-14.58.991
9102530Parkside Garage-1.93-3.09-1.3
10102531Langor Bridge Garage00-2.48
11102532West Raynham Auto Clinic-6.970-2.51
12102533Colkirk Motors-0.460-2.53
13102534Howes Of Fakenham000
14102535Coburn Vehicle Systems Ltd-3.690-1.82
15102536Major Tyres-0.18-4.31-2.3
16102537Bell Motors-1.210-0.37
17102539Fakenham Auto Electrical000
18102542R & M Eke Motor Engineers9.29-1.6614.714.73
19102544Nick Massingham-3.85-1.68-1.57
20102545Braggs Of Briston Ltd-1.430-7.98
21102546R And K Autos000
22102548R M C-6.88-20.04-15.83
23102553Aerolite Garage2.88033.0733.072
24102554P J's000
25102557Hjc Ltd (Home James)0-0.1-12.34
26
Customer Data
Cell Formulas
RangeFormula
S3=IF(AND(O3>0,MAX(O3:Q3)=O3),O3,"")
T3=IF(AND(P3>0,MAX(O3:Q3)=P3,S3=""),P3,"")
U3=IF(AND(Q3>0,MAX(O3:Q3)=Q3,S3="",T3=""),Q3,"")
V3=IF(S3<>"",RANK(S3,S$3:S$40),"")


The S, T, and U formulas decide which column (if any) the rebate should go in. Then the V3 formula, which you copy across to X3 and down as far as needed, gives the ranking. Then your Top 50 lists only have to do an INDEX(MATCH on the ranking number to find the account number, name, and amount. I'll see if I can consolidate this a bit.
 
Upvote 0
Glad it works for you! :cool:

I spent some time trying to get this a bit simpler, but everything I tried required longer, more complicated, and more calculation intensive formulas. This takes extra columns, but it's pretty easy to follow and is efficient.
 
Upvote 0

Forum statistics

Threads
1,214,561
Messages
6,120,245
Members
448,952
Latest member
kjurney

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