How to get unique values from 2 columns of the same data type and output in a single column?

helpneeded2

Board Regular
Joined
Jun 25, 2021
Messages
110
Office Version
  1. 365
Platform
  1. Windows
I am trying to create a sheet that will look at the ID numbers used on two different tables and will display a list of all ID's used. I am just outputting the list in a single cell via:

Excel Formula:
=SUBSTITUTE(TEXTJOIN(",",TRUE,value_idUsed#),",0","")

For obtaining the data from a single table I am using this:

Excel Formula:
=SORT(UNIQUE(table_jDataRaw[ID Number],FALSE),1)

The second column of data is in table_vDataRaw[ID Number]

Is there any way of having the UNIQUE range source be from 2 different columns, but output in a single column?
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Are the two tables on the same sheet?
 
Upvote 0
Ok, how about
Excel Formula:
=LET(a,table_jDataRaw[ID Number']],b,table_vDataRaw[ID Number],ra,ROWS(a),s,SEQUENCE(ra+ROWS(b)),SORT(UNIQUE(IF(s<=ra,INDEX(a,s),INDEX(b,s-ra)))))
 
Upvote 0
Ok, how about
Excel Formula:
=LET(a,table_jDataRaw[ID Number']],b,table_vDataRaw[ID Number],ra,ROWS(a),s,SEQUENCE(ra+ROWS(b)),SORT(UNIQUE(IF(s<=ra,INDEX(a,s),INDEX(b,s-ra)))))
Thanks a lot for this! While I understand the functions involved in this formula, unfortunately it is a little beyond the cognitive processing ability of my old brain. How could I modify the sort, so that it only uses values that are greater than 0 from either source table?
 
Upvote 0
How about
Excel Formula:
=LET(a,table_jDataRaw[ID Number']],b,table_vDataRaw[ID Number],ra,ROWS(a),s,SEQUENCE(ra+ROWS(b)),u,SORT(UNIQUE(IF(s<=ra,INDEX(a,s),INDEX(b,s-ra)))),FILTER(u,u>0))
 
Upvote 0
Solution
Excellent. Thank you again for your help. I'm certainly learning that the ability to assign variables and formulas via LET really seems to be one of Excel 365's more powerful advantages.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,064
Messages
6,122,936
Members
449,094
Latest member
teemeren

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