Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 78
Default Remove Sequential Repeats

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   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


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 78
Default Remove Sequential Repeats

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
NO REPEATS HOMER Charts and Charting in Excel 3 July 11th 08 09:55 PM
No repeats of name in same colum Headworth Excel Discussion (Misc queries) 2 June 22nd 08 12:19 PM
Non-sequential VLOOKUP function -OR- sequential sort of web query Eric S Excel Worksheet Functions 1 February 28th 05 07:50 PM
Count repeats Daniel Bonallack Excel Worksheet Functions 7 December 10th 04 05:13 PM
Sequential names on Sequential pages Salt4 Excel Worksheet Functions 2 November 12th 04 04:24 PM


All times are GMT +1. The time now is 11:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"