Getting Unique values in a cell

jninyo

New Member
Joined
Feb 18, 2022
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Hi All, I have a question on getting unique values based on a criteria in a cell. See below

ColumnA ColumnB
John Green
Alice Yellow
Mary Red
Mary Green
Mary Yellow
John Red
Mary Red

So I would like to write a formula to a cell where it will look at column A, find name Mary in column A and give me Unique values for Mary for the colors she used. I am saying unique since you can see Mary used Red 2 times but should be listed once. I am able to use array function with filter and unique but it returns unique values in separate cells. I would like to have an output in a single cell like this: "Red/Green/Yellow"
Thank you
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Welcome to the MrExcel board!

For the future:
MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.

Just include the TEXTJOIN function

22 02 19.xlsm
ABCDE
1ColumnA ColumnB
2JohnGreen MaryRed/Green/Yellow
3AliceYellow
4MaryRed
5MaryGreen
6MaryYellow
7JohnRed
8MaryRed
TEXTJOIN
Cell Formulas
RangeFormula
E2E2=TEXTJOIN("/",1,UNIQUE(FILTER(B2:B8,A2:A8=D2)))
 
Upvote 0
You're welcome. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,215
Members
448,554
Latest member
Gleisner2

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