Compare data in columns, remove duplicates and return unique values in a new column

Status
Not open for further replies.

nitiona

Banned User
Joined
Jul 29, 2023
Messages
16
Office Version
  1. 2019
Platform
  1. Windows
Dear Experts,

Request your support in generating excel formula for below query,

Basically I have excel containing 4 columns, having unique data. I need a formula that can compare data in 4 columns and return only unique values in a new colum with '+' separator, removing any duplicates. Sample screenshot is attached.
 

Attachments

  • Screenshot 2024-02-03 094438.png
    Screenshot 2024-02-03 094438.png
    3.4 KB · Views: 25
Try this

1
Excel Formula:
=TEXTJOIN("+",,UNIQUE(TRANSPOSE(A2:D2)))

2 (without TEXTJOIN)
Excel Formula:
=LEFT(CONCAT(TRANSPOSE(UNIQUE(TRANSPOSE(A2:D2)))&"+"),LEN(CONCAT(TRANSPOSE(UNIQUE(TRANSPOSE(A2:D2)))&"+"))-1)
 
Upvote 0

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Try this

1
Excel Formula:
=TEXTJOIN("+",,UNIQUE(TRANSPOSE(A2:D2)))

2 (without TEXTJOIN)
Excel Formula:
=LEFT(CONCAT(TRANSPOSE(UNIQUE(TRANSPOSE(A2:D2)))&"+"),LEN(CONCAT(TRANSPOSE(UNIQUE(TRANSPOSE(A2:D2)))&"+"))-1)
Hi Same error for both. Please see screenshot for reference.
 

Attachments

  • Screenshot 2024-02-05 125135.png
    Screenshot 2024-02-05 125135.png
    13.3 KB · Views: 8
  • Screenshot 2024-02-05 125153.png
    Screenshot 2024-02-05 125153.png
    10.6 KB · Views: 9
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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