View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
JB JB is offline
external usenet poster
 
Posts: 115
Default Remove Sequential Repeats

An UDF

In a module: (Alt+F11 Insert/Module)

Function SD(chaine)
temp = Left(chaine, 1)
For i = 2 To Len(chaine)
If Right(temp, 1) < Mid(chaine, i, 1) Then
temp = temp & Mid(chaine, i, 1)
End If
Next i
SD = temp
End Function

http://cjoint.com/?clqkYUsXJo

JB
http://boisgontierjacques.free.fr


On 9 fév, 15:30, Jakobshavn Isbrae
wrote:
I have a single column of data containing variable length text strings. *In
some of the data, characters repeat sequentially. *For example *AABBCCDD
I need a function or formula that removes sequential repeats.

if
input: *AABBCC *output: ABC
input: *AAAAAA *output: A
input: *AAABBC *output: ABC
input: *ABCDEF *output: ABCDEF
input: *BAAAAB *output: BAB
input: *DD * * *output: D

Any suggestions will be greatly appreciated!

--
jake