Top 10 Clients without using a Pivot Table

jon999

New Member
Joined
Aug 24, 2015
Messages
37
Hi

Is there a formula that can work out the top 10 clients without using a pivot table.

For example

Client A North 100
Client B East 50
Client C South 50
Client A North 20
Client B North 30
Client C East 60

So from the above the formula needs to work it all out (client name, location, amount) so it would look like this
#1 Client A North 120
#2 Client C East 60

I know it is easier to use a pivot table but want to know if a formula can work this out.

Thanks
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Here's one way.
Copy formulas in E2, F2 & G2 down 10 rows.

NOTE: formulas in E2 & F2 are array formulas and must be entered with CTRI-SHIFT-ENTER (command-return on MAC)
Excel Workbook
ABCDEFG
1ClientLocationAmountClientLocationAmount
2Client ANorth100Client ANorth100
3Client BEast50Client CEast60
4Client CSouth50Client BEast50
5Client ANorth20Client CSouth50
6Client BNorth30Client BNorth30
7Client CEast60Client ANorth20
Sheet
 
Upvote 0
Thanks AhoyNC for the reply but I need it to sum the amounts and then return the each Client once and each Location once.

For example

Client A North 100
Client A North 20

Will then return

Client A North 120

Thanks
 
Upvote 0
maybe



Excel 2007
ABCDEFG
1ClientLocationAmountClientLocationAmount
2Client ANorth100Client ANorth120
3Client BEast50Client CEast60
4Client CSouth50Client BEast50
5Client ANorth20Client CSouth50
6Client BNorth30Client BNorth30
7Client CEast60
Sheet1
Cell Formulas
RangeFormula
G2=SUMPRODUCT(--($A$2:$A$7=E2)*($B$2:$B$7=F2),($C$2:$C$7))
G3=SUMPRODUCT(--($A$2:$A$7=E3)*($B$2:$B$7=F3),($C$2:$C$7))
G4=SUMPRODUCT(--($A$2:$A$7=E4)*($B$2:$B$7=F4),($C$2:$C$7))
G5=SUMPRODUCT(--($A$2:$A$7=E5)*($B$2:$B$7=F5),($C$2:$C$7))
G6=SUMPRODUCT(--($A$2:$A$7=E6)*($B$2:$B$7=F6),($C$2:$C$7))
 
Upvote 0
Thanks AhoyNC for the reply but I need it to sum the amounts and then return the each Client once and each Location once.

For example

Client A North 100
Client A North 20

Will then return

Client A North 120

Thanks

Could client A be a duplicate, leaving in different regions, that is, johnson living in north and Johnson living in south?
 
Upvote 0
Could client A be a duplicate, leaving in different regions, that is, johnson living in north and Johnson living in south?

Additional clarification:

Client A North 100
Client A North 60
Client A East 80

Is this possible? That is, are your clients unique with respect to the location?
 
Upvote 0
The information is coming from a database where the client is listed many times which has many sales. I am trying to work out through a formula to go down the list add up all the sales by client and return the top 10 just like it would in a pivot table by selecting all the data and then it list the client once with the total sales and then you can sort by top 10 etc.
 
Upvote 0
The information is coming from a database where the client is listed many times which has many sales. I am trying to work out through a formula to go down the list add up all the sales by client and return the top 10 just like it would in a pivot table by selecting all the data and then it list the client once with the total sales and then you can sort by top 10 etc.

Additional clarification:

Client A North 100
Client A North 60
Client A East 80

Is this possible? That is, are your clients unique with respect to the location?

I'll just assume that a client is unique to a region...

Row\Col
A​
B​
C​
D​
E​
F​
G​
1​
clientregionvalueTop N
3​
2​
ANorth
100​
# clients
5​
3​
BEast
50​
Nth total
80​
4​
CSouth
50​
Top N Adjusted
4​
5​
ANorth
20​
clientscore
6​
BNorth
30​
A
120​
7​
CEast
60​
C
110​
8​
DWest
80
B
80​
9​
EMid West
30
D
80​
10​

<tbody>
</tbody>

G1: 3 (Modify to 10 for your data.)

In G2 control+shift+enter, not just enter:
Rich (BB code):
=SUM(IF(FREQUENCY(IF(1-($A$2:$A$9=""),MATCH($A$2:$A$9,$A$2:$A$9,0)),
    ROW($A$2:$A$9)-ROW($A$2)+1),1))

In G3 control+shift+enter, not just enter:
Rich (BB code):
=LARGE(SUMIFS($C$2:$C$9,$A$2:$A$9,IF(FREQUENCY(IF(1-($A$2:$A$9=""),
    MATCH($A$2:$A$9,$A$2:$A$9,0)),ROW($A$2:$A$9)-ROW($A$2)+1),$A$2:$A$9)),
    MIN(G1,G2))

In G4 control+shift+enter, not just enter:
Rich (BB code):
=SUM(IF(SUMIFS($C$2:$C$9,$A$2:$A$9,IF(FREQUENCY(IF(1-($A$2:$A$9=""),
    MATCH($A$2:$A$9,$A$2:$A$9,0)),ROW($A$2:$A$9)-ROW($A$2)+1),
    $A$2:$A$9))>=G3,1))

In F6 control+shift+enter, not just enter, and copy down:
Rich (BB code):
=IF($G6="","",INDEX($A$2:$A$9,SMALL(IF(SUMIFS($C$2:$C$9,$A$2:$A$9,
    IF(FREQUENCY(IF($A$2:$A$9<>"",MATCH($A$2:$A$9,$A$2:$A$9,0)),
    ROW($A$2:$A$9)-ROW($A$2)+1),$A$2:$A$9))=$G6,
    ROW($A$2:$A$9)-ROW($A$2)+1),COUNTIFS($G$6:G6,G6))))

In G6 control+shift+enter, not just enter, and copy down:
Rich (BB code):
=IF(ROWS($G$6:G6)<=$G$4,LARGE(SUMIFS($C$2:$C$9,$A$2:$A$9,
    IF(FREQUENCY(IF(1-($A$2:$A$9=""),MATCH($A$2:$A$9,$A$2:$A$9,0)),
    ROW($A$2:$A$9)-ROW($A$2)+1),$A$2:$A$9)),ROWS($G$6:G6)),"")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,465
Messages
6,124,982
Members
449,201
Latest member
Lunzwe73

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