View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Demosthenes Demosthenes is offline
external usenet poster
 
Posts: 36
Default Isolating string combinations

This is a further iteration of a problem I've been working on and posted
earlier under the subject: "Question for Mr. T. Valko." The question is now
up for general consideration.

Say you have the following data:

AB
CD
CD
CE
CD
CF
AG
CD
CD
AB
CD
AB
CD
AB
CD
CF
CG
CE
CW

Which can be in one or two columns. I'm trying to analyze the makeup of the
"CX" occurrences (i.e., whether they are CD, CF, CG, etc), but ONLY IN CHAINS
longer than 4 occurrences (i.e., 4 C's in a row or longer). I could do this
if only I could figure out a way to create a helper column that is composed
of just these instances that I'm considering. So my question is: How do I
create a helper column that is composed of only the chains of 4 or longer?
Output for the above would be:

AB
CD
CD
CE
CD
CF

AB
CD
CF
CG
CE
CW

Does anyone have any thoughts on an easy way to do this?