Find unique with formula (no VBa)

nemmi69

Well-known Member
Joined
Mar 15, 2012
Messages
938
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2013
Platform
  1. Windows
Hi all,
This is taken from a previously asked question but that allowed VBa. In this case I am trying to do it via formula and not use multiple columns to get the result. IE only the cell in "C" has a formula. This should keep all guru's busy for awhile :laugh: I sure as heck have not got far.


[TABLE="class: cms_table_grid, width: 600"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]chocolate, strawberry[/TD]
[TD]banana, chocolate, strawberry[/TD]
[TD]banana[/TD]
[/TR]
[TR]
[TD]vanilla, blueberry[/TD]
[TD]licorice, raspberry, vanilla, fudge, blueberry[/TD]
[TD]licorice, raspberry, fudge[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
You want replace so you can use SUBSTITUTE
[C1]=SUBSTITUTE(TRIM(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(B1,LEFT(A1,FIND("$",SUBSTITUTE(A1,",","$",1))-1),"",1),RIGHT(A1,LEN(A1)-FIND("$",SUBSTITUTE(A1,",","$",1))),""),","," "))," ",", ")
 
Upvote 0
Thanks Sadboy309 but that just duplicates the "B" cell. It does not return the unique item(s).
 
Last edited:
Upvote 0
Sorry, post got edited. It just duplicates B
 
Upvote 0
Suspect it will need concatenate or something (cannot use TEXTJOIN [thanks Microsoft for not sending out updates to 2016])
 
Upvote 0
Sorry, post got edited. It just duplicates B
Put this into C2:
Code:
=SUBSTITUTE(TRIM(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(B2,LEFT(A2,FIND("$",SUBSTITUTE(A2,",","$",1))-1),"",1),RIGHT(A2,LEN(A2)-FIND("$",SUBSTITUTE(A2,",","$",1))),""),","," "))," ",", ")

Try again. It works fine.
 
Upvote 0
@FlexMind
Can you please post the formula to the board, so that members don't have to download the file.
Thanks
 
Upvote 0
@Fluff
I have used the formula from post #2 , and uploaded file for @nemmi69, which says that the formula does not work.
You want replace so you can use SUBSTITUTE
[C1]=SUBSTITUTE(TRIM(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(B1,LEFT(A1,FIND("$",SUBSTITUTE(A1,",","$",1))-1),"",1),RIGHT(A1,LEN(A1)-FIND("$",SUBSTITUTE(A1,",","$",1))),""),","," "))," ",", ")
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,183
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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