#=SORT(UNIQUE(FILTER(A2:E10,{0,1,1,0,1})))

ellison

Active Member
Joined
Aug 1, 2012
Messages
343
Office Version
  1. 365
Platform
  1. Windows
Hi, we are trying to work with a unique filter like this: =SORT(UNIQUE(FILTER(A2:E10,{0,1,1,0,1})))

It's great, but we can't figure out how to add in:
i) a filter for Info-1 = TRUE
ii) sort the info by Info-2
iii) (we're hoping the dedupe is already being taken care of by the formula!)

Hope this makes things a little clearer:



Excel-Filter-unique-sort-one-criteria.xlsx
ABCDEFGHIJK
1RowInfo-1Info-2Info-3Info-4Formula in I2 in trying:Info-1Info-2Info-4
22TRUEBetaWIP1: To only include fields for Info-1, Info-2 and Info-4, "done"FALSEBetaWIP
33BetasomteimesWIP2: To dedupe those 3 fields, "TBC"FALSEFoxtrotvolume
44FALSEBetasomteimesWIP3: Include only entries where Info-1 is TRUE, "failed"TRUEBetaWIP
55TRUEBetasomteimesWIP4: To sort by Info-2, "failed"TRUEFoxtrotvolume
66TRUEBetasomteimesWIPTRUEAlphaobsolete
77Foxtrotsomteimesobsolete0BetaWIP
88TRUEFoxtrotvolume0Foxtrotobsolete
99TRUEAlphacellsobsolete
1010FALSEFoxtrotblankvolume
Sheet1
Cell Formulas
RangeFormula
I2:K8I2=SORT(UNIQUE(FILTER(A2:E10,{0,1,1,0,1})))
Dynamic array formulas.


Huge thanks for taking a look!
 

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.
How about
Excel Formula:
=SORT(UNIQUE(FILTER(CHOOSECOLS(B2:E10,1,2,4),B2:B10)),2)
 
Upvote 0
Wow, that works brilliantly - I'm just trying to break it down.....

=SORT(UNIQUE(FILTER(CHOOSECOLS(B2:E10,1,2,4),B2:B10)),2)

- choose cols chooses which columns from the range to add, if you skip a number then the column isn't added
- and I think the last "2" in the formula determines which field that the newly reorganised data will be sorted by
- and I'm stumped as to how the formula knows to only include "TRUE" from Info-1?!
 
Upvote 0
You could write the formula like
Rich (BB code):
=SORT(UNIQUE(FILTER(CHOOSECOLS(B2:E10,1,2,4),B2:B10=TRUE)),2)
but as you already have true in the cells you can just use the range.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
Hi, I was wondering if there is way of getting this formula to return a blank cell (rather than return a zero)...
i.e. for blank cells in columns for Info-2 and Info-4 such as D2, E5 and E7

Excel-Filter-unique-sort-one-criteria.xlsx
ABCDEFGHIJKLMNO
1RowInfo-1Info-2Info-3Info-4done via current formulaInfo-1Info-2Info-4done manually to try to show what we are after:Info-1Info-2Info-4
22TRUEWIPTRUEAlphaobsoleteTRUEAlphaobsolete
33BetasomteimesWIPTRUEBeta0TRUEBeta
44FALSEBetasomteimesWIPTRUEBetaWIPTRUEBetaWIP
55TRUEBetasomteimesTRUEFoxtrot0TRUEFoxtrot
66TRUEBetasomteimesWIPTRUE0WIPTRUEWIP
77Foxtrotsomteimesobsolete
88TRUEFoxtrot
99TRUEAlphacellsobsolete
1010FALSEFoxtrotblankvolume
2nd-Q-blanks
Cell Formulas
RangeFormula
H2:J6H2=SORT(UNIQUE(FILTER(CHOOSECOLS(B2:E10,1,2,4),B2:B10=TRUE)),2)
Dynamic array formulas.



Thanks for taking a peek!
 
Upvote 0
How about
Excel Formula:
=LET(x,SORT(UNIQUE(FILTER(CHOOSECOLS(B2:E10,1,2,4),B2:B10=TRUE)),2),IF(x="","",x))
 
Upvote 0
Solution
Wow, that is really helpful - HUGE thanks 💪 💪 (y) (y) 💪
All the best
 
Upvote 0
Glad to help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,378
Messages
6,124,604
Members
449,174
Latest member
ExcelfromGermany

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