Extract Top 3 customer names

mgirvin

Well-known Member
Joined
Dec 15, 2005
Messages
1,245
Office Version
  1. 365
Platform
  1. Windows
Dear Smartest Excelers In The World,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
I want to extract the top 3 customer names with a single formula (no helper cells and no sorting data). I have come up with a formula. I am hoping that someone can see a better formula (shorter, faster calculating, etc.).<o:p></o:p>
<o:p></o:p>
Here is the data and formulas (formulas in green):<o:p>
Excel Workbook
ABCDEFGHI
1IndustryCustomerAmountTop3
2AAcct 111959948.70
3BAcct 191012138.44Industry/CustomerCustomer 1Customer 2Customer 3Customer 4
4BAcct 251659948.70AAcct 5201Acct 1119Acct 8375.
5BAcct 374359948.70BAcct 4045Acct 7206Acct 2516Acct 3743
6BAcct 380613796.14
7BAcct 400752577.10
8BAcct 404579274.82
9AAcct 440823608.90
10AAcct 520175850.20
11BAcct 70898774.80
12BAcct 720664366.50
13AAcct 837559948.70
...
</o:p><o:p>
</o:p>
<o:p></o:p>
<o:p>Formula in cell F4 is copied throughout range F4:I5:</o:p>
<o:p></o:p>
<o:p>
Excel Workbook
F
4Acct 5201
...


#VALUE!
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}. Note: Do not try and enter these manually yourself

</o:p>
<o:p></o:p>
<o:p>Any ideas how to make this ridiculous formula better?<o:p></o:p></o:p>
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
F4, control+shift+enter,copy across, and down:
Rich (BB code):
=IFERROR(INDEX($B$2:$B$13,MATCH(LARGE(IF($A$2:$A$13=$E4,
    IF($C$2:$C$13>=LARGE(IF($A$2:$A$13=$E4,$C$2:$C$13),$F$1),
    $C$2:$C$13+(ROW($C$2:$C$13)/1000000))),
    COLUMNS($F4:F$4)),$C$2:$C$13+ROW($C$2:$C$13)/1000000,0)),"")
 
Upvote 0
Absolutely Awesome Aladin!!!<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
It was the "adding a little bit more to each number to deal with duplicates" that really helped a lot!!! Which then reduces it down to a standard "extract data with two criteria INDEX MATCH" formula with a bit added to each to deal with dups.<o:p></o:p>
<o:p></o:p>
Thank you very much for the efficient formula that robustifies quite well!<o:p></o:p>
 
Upvote 0

Forum statistics

Threads
1,224,618
Messages
6,179,916
Members
452,949
Latest member
beartooth91

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