SORT(UNIQUE(FILTER) from 2 columns

thewiseguy

Well-known Member
Joined
May 23, 2005
Messages
1,015
Office Version
  1. 365
Platform
  1. Windows
Hi all - I currently am using the following formula:

=SORT(UNIQUE(FILTER('Line Item (input)'!AG3:AG502,('Line Item (input)'!AG3:AG502 <>"")*('Line Item (input)'!AG3:AG502<>0),"")))

I would like to add in another column into this equation:

=SORT(UNIQUE(FILTER('Line Item (input)'!AI3:AI502,('Line Item (input)'!AI3:AI502 <>"")*('Line Item (input)'!AI3:AI502<>0),"")))

Is this possible..to sort unique values form 2 separate columns?

Any help is greatly appreciated!
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Your question is a little unclear to me. Are you looking for two columns of output, each one UNIQUE'ly FILTER'ed and SORT'ed separately from the original two columns OR do you want a single column output where all the data in both columns are combined, FILTER'ed, etc.?
 
Upvote 0
Hi Rick. Sorry for the confusion. i would like 1 column of unique data pulled from 2 (or more) columns.
 
Upvote 0
This is untested (I'm doing this off the top of my head), but I think it should work. The key is to use VSTACK to put the data into a single column reference and process that. Also note how using LET's ability to define a variable for lengthy items makes your code more compact and easier to read.
=LET(sh,VSTACK('Line Item (input)'!AG3:AG502,'Line Item (input)'!AI3:AI502),SORT(UNIQUE(FILTER(sh,(sh <>"")*(sh<>0),""))))
 
Upvote 0
Solution

Forum statistics

Threads
1,223,234
Messages
6,170,891
Members
452,366
Latest member
TePunaBloke

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