Search adjacent cells in Column for sequence

  • Thread starter Thread starter notvalid
  • Start date Start date
N

notvalid

I need to search a worksheet, by columns, for a specific sequence of
letters. For example, Column A might contain:

A
A
B
B
E
E

I need to find the first occurrence of the (vertical) sequence ABBE,
edit that sequence, then find the next occurrence, etc. The
(vertical) sequence would never be more than 5 letters.

Thanks in advance for your help.
 
Try this:

With data in A1:An, enter this formula in B1 and copy down to the end of
data.

=IF(AND(A1="A",A2="B",A3="B",A4="E"),"x","")

"x" will mark the start of the sequence.
 
Back
Top