SORTBY Combined with UNIQUEFILTER

Citrusandsage

New Member
Joined
May 13, 2021
Messages
12
Office Version
  1. 365
I need help so I have 2 columns I’m working off of, column B is a unique filter of industry being pulled from a control tab and then Column C is the number of opportunities. I want the Unique filter in column B to automatically sort by the number of opportunities high to low. The UNIQUEFILTER formula is
=UNIQUE(FILTER(Control!$N$4:$N$80,(Control!$N$4:$N$80<>0)))

how the heck do I get this to work? The range in which I need to sort is C7:C44
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Try:

Book1
ABCDENO
1
2
3IndustryOpportunities
4Pharm4
5Tech2
6IndustryOpportunitiesPharm3
7Pharm16Manufacturing2
8Service13Pharm8
9Tech4Tech2
10Manufacturing2Service6
11Service7
12Pharm1
13
Control
Cell Formulas
RangeFormula
B7:C10B7=SORT(UNIQUE(CHOOSE({1,2},FILTER(Control!N4:N80,Control!N4:N80<>""),SUMIF(Control!N4:N80,FILTER(Control!N4:N80,Control!N4:N80<>""),Control!O4:O80))),2,-1)
Dynamic array formulas.
 
Last edited:
Upvote 0
Hi

=SORT(CHOOSE({1,2},UNIQUE(N4:N12),SUMIF(N4:N12,UNIQUE(N4:N12),O4:O12)),2,-1)
 
Upvote 0
ISY, I started out with that version, but it requires that you put in the actual ranges (N4:N12, etc.). If you put in the maximum range (N4:N80) and there are blank cells, that will result in a 0 value for the last row. Which is why I switched to the more awkward form I posted.
 
Upvote 0
Hi

Alternative
=SORT(CHOOSE({1,2},FILTER(UNIQUE(N4:N80),UNIQUE(N4:N80)>0),SUMIF(N4:N80,FILTER(UNIQUE(N4:N80),UNIQUE(N4:N80)>0),O4:O80)),2,-1)
 
Upvote 0

Forum statistics

Threads
1,214,981
Messages
6,122,565
Members
449,089
Latest member
Motoracer88

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