ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Search adjacent cells in Column for sequence (https://www.excelbanter.com/excel-worksheet-functions/242206-search-adjacent-cells-column-sequence.html)

[email protected]

Search adjacent cells in Column for sequence
 
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.

T. Valko

Search adjacent cells in Column for sequence
 
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.

--
Biff
Microsoft Excel MVP


wrote in message
...
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.




[email protected]

Search adjacent cells in Column for sequence
 
That's got it, thanks!

On Thu, 10 Sep 2009 00:22:24 -0400, "T. Valko"
wrote:

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.


T. Valko

Search adjacent cells in Column for sequence
 
You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


wrote in message
...
That's got it, thanks!

On Thu, 10 Sep 2009 00:22:24 -0400, "T. Valko"
wrote:

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.





All times are GMT +1. The time now is 10:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com