Using multiple cells as search pattern.

  • Thread starter Thread starter Bo Rasmussen
  • Start date Start date
B

Bo Rasmussen

Hi,

I'm using excel for an analysis of a communications protocol, and I would
like to search for a pattern where two (or more) adjacent cells match some
pattern. Say I want to look for the pattern 10|11 (i.e. 10 in cell1, 11 in
the next cell in the column) - can that be done ?

Regards
Bo Rasmussen
 
Bo,

If your packets/blocks/whatever have been put into rows, and you're looking
down two columns for this pattern, use Data - Advanced Filter.

Or if you're using VLOOKUP, looking with multiple-field criteria can't be
done directly. BUt you can "build" criteria by concatenating them, both in
your vlookup, and in your table:

=VLOOKUP( 10 & " " & 11, etc...)

The space between the two is necessary for the possibility of finding
something like 101|1 in the data.

Then you need to build a helper column for the VLOOKUP to look in:

=A2 & " " & B2

and copy down. Use that for the leftmost (search) column of the VLOOKUP.

If instead of a table of packets/whatever, you have a continuous stream of
data, and you're looking for this pattern anywhere along it, you'll need to
tell us how the information is arranged in the worksheet. Give some
examples.
 
Hi,

And thanks for your replies. Actually I'm only looking in one row containing
the characters transmitted on a serial line. If say 324 characters has been
transmitted, then there's 324 rows for that column. Now I'm looking for a
sequence of characters e.g. A B in the column. How is that done ?

Regards and thanks in advance
Bo Rasmussen
 
Bo,

OK. Now the question is - how do you want the results?

If you want indications in situ for multiple occurrences, you could put a
formula in an adjacent column. This would flag each occurence.

=IF(AND(A2=10,A3=11),"*","")

Copy down with fill handle or copy/paste. This will mark each occurrence
with an asterisk.
 
Thanks :o)I would offcourse like to have something like find / find next,
but that can now easily be done by searching for the generated asteriss

Bo
 
Back
Top