Max Occurances

dgaller

New Member
Joined
Apr 23, 2009
Messages
28
Max Occurances
<HR style="BACKGROUND-COLOR: #ebebeb; COLOR: #ebebeb" SIZE=1><!-- / icon and title --><!-- message --><!-- BEGIN TEMPLATE: ad_showthread_firstpost_start --><!-- END TEMPLATE: ad_showthread_firstpost_start -->I have a pivot table that has 3 columns the first is state the second is vendor and the third is a count of locations the vendor has in that state. I would like to then just show only the vendor with the greated number of locations in each state?

Example:

CT Vendor1 10
CT Vendor2 5
IL Vendor1 4
Il Vendor2 20

ETC.

I want to either have a formula or pivot to narrow the list like below.

CT Vendor1 10
IL Vendor2 20
Etc

<!-- / message --><!-- BEGIN TEMPLATE: ad_showthread_firstpost_sig --><!-- END TEMPLATE: ad_showthread_firstpost_sig -->
<!-- controls -->
progress.gif
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
If that will be any help for you.

If your data are in A2:C5:

From column A copy and paste only unique to column E starts from E2 then in F1 copy down:

=INDEX($A$2:$C$5,MATCH(E2&MAX(IF($A$2:$A$5=E2,$C$2:$C$5)),$A$2:$A$5&$C$2:$C$5,0),2)

in G1:
=INDEX($A$2:$C$5,MATCH(E2&F2,$A$2:$A$5&$B$2:$B$5,0),3)

Both Arrays formulas(confirm CTRL+SHIFT+ENTER)
 
Upvote 0
Thanks for your assistance. I am having a hard time getting this to work. From what I understand I need to past the array formula into cell F1 and copy it down?
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,286
Members
452,902
Latest member
Knuddeluff

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