Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Perfect!
Thank you! -- jake "JB" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
NO REPEATS | Charts and Charting in Excel | |||
No repeats of name in same colum | Excel Discussion (Misc queries) | |||
Non-sequential VLOOKUP function -OR- sequential sort of web query | Excel Worksheet Functions | |||
Count repeats | Excel Worksheet Functions | |||
Sequential names on Sequential pages | Excel Worksheet Functions |