Summarize Unique Values from High to Low

kumara_faith

Well-known Member
Joined
Aug 19, 2006
Messages
922
Office Version
  1. 365
Hi,

I have the following Table 1:

Book1
DE
2Table 1
3Sector%
4Technology15%
5Technology11%
6Technology14%
7Consumer5%
8Technology5%
9Index4%
10Technology11%
11Healthcare3%
12Technology4%
13Financial4%
14Technology9%
15Technology3%
16Index5%
17Financial1%
18Technology3%
19Consumer2%
20Crypto1%
21Technology1%
Sheet1


In Table 2 below, I am trying to summarize the data from Table 1 with unique values sorted automatically from high to low:

Cell Formulas
RangeFormula
H4:H21H4=IF(I4<>"",INDEX($D$4:$D$21,SMALL(IF($E$4:$E$21=I4,ROW($E$4:$E$21)-ROW($E$4)+1),COUNTIF($I4:I$21,I4))),"")
I4:I21I4=LARGE($E$4:$E$21,ROWS($A$3:$A3))


The formula does not seem to work properly. The correct result should be as below:

Book1
KL
4Sector%
5Technology76%
6Index9%
7Consumer6%
8Financial5%
9Healthcare3%
10Crypto1%
Sheet1


Appreciate any help.
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
You can use a pivot table and order by the sum of the %:

1642853963436.png
 

Attachments

  • 1642853801784.png
    1642853801784.png
    19.3 KB · Views: 4
Upvote 0
Hi Dante,

Thank you for your response. However, I would like to use a formula solution. Is there a way to amend the current formula to achieve this ?
 
Upvote 0
How about
+Fluff 1.xlsm
DEFGHI
1
2Table 1
3Sector%Technology76%
4Technology15%Index9%
5Technology11%Consumer6%
6Technology14%Financial5%
7Consumer5%Healthcare3%
8Technology5%Crypto1%
9Index4%
10Technology11%
11Healthcare3%
12Technology4%
13Financial4%
14Technology9%
15Technology3%
16Index5%
17Financial1%
18Technology3%
19Consumer2%
20Crypto1%
21Technology1%
22
Data
Cell Formulas
RangeFormula
H3:I8H3=LET(u,UNIQUE(D4:D21),SORT(CHOOSE({1,2},u, SUMIFS(E4:E21,D4:D21,u)),2,-1))
Dynamic array formulas.
 
Upvote 0
Solution
Hi Fluff,

That worked. Thank you and appreciate your valuable time and patience. Have a great day.?
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,614
Messages
6,120,533
Members
448,969
Latest member
mirek8991

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