Formula to extract unique string from sheet2 column C

I have sheet2 with column C with data.

i want to extract unique values from Sheet2 col C into sheet1  A1 single cell separated by comma

thanks.
LVL 6
FloraAsked:
Who is Participating?
 
Rgonzo1971Commented:
Hi,

pls try (easier with vba) not sure it's possible with formula
Sub macro()
Set ws2 = Sheets("Sheet2")
lr = ws2.Cells(Rows.Count, 3).End(xlUp).Row

Set Rng = ws2.Range(Range("C2"), ws2.Range("C" & Rows.Count).End(xlUp))
Set dict = CreateObject("Scripting.Dictionary")

For Each c In Rng
    dict(c.Value) = ""
Next
arrKeys = dict.Keys
res = Join(arrKeys, ",")
Sheets("Sheet1").Range("A1") = res
End Sub

Open in new window

Regards
1
 
FloraAuthor Commented:
thank you again
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.