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

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
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,223,901
Messages
6,175,277
Members
452,629
Latest member
SahilPolekar

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