View Single Post
  #4  
Old June 3rd, 2010, 10:00 AM posted to microsoft.public.excel.worksheet.functions
Elton Law[_2_]
external usenet poster
 
Posts: 94
Default A string of data in a cell

Hi Jacob and and Tom,
Both work.... It is great job.
Thanks so much for help. I am very much appreciated.

"Jacob Skaria" wrote:

Try this UDF (User Defined function). From workbook launch VBE using Alt+F11.
From menu Insert a Module and paste the below function.Close and get back to
workbook and try the below formula.

=GetUniqueNumString(A1)

Function GetUniqueNumString(strData As String) As String
Dim intCount As Integer, arrData As Variant
For Each varItem In Split(strData, ",")
If InStr("," & GetUniqueNumString & ",", "," & varItem & ",") = 0 Then
GetUniqueNumString = GetUniqueNumString & "," & varItem
End If
Next
GetUniqueNumString = Mid(GetUniqueNumString, 2)
End Function


--
Jacob (MVP - Excel)


"Elton Law" wrote:

Dear expert,

I got a system generated file.
Say cell A1 to A3 are below.

12,12,12,13,12,12,12,14,12,12,14
15,15,15,13,13,13,14,15,16,17,15
19,19,19,20,20,20,20,20,20,20,19

Is it possible to filter all duplicated numbers and come out like this in
cell B1 to B3?
12,13,14
15,13,14,16,17
19,20

Sequence is not a issue. It doesn't matter.
Thanks.