In my last post I showed you how to find a sequence of values. The array formula extracted the row of the first found sequence, see below.

Find a sequence of values

Array formula in cell F3:

=MATCH(1, COUNTIFS(E3, B1:B23, E4, B2:B24), 0)

Recommended article

Find a sequence

This array formula finds the sequence "Axis Chemical Co." (cell E2) and "Southern Railway" (cell E3) in two consecutive cells […]

Comments(2) Filed in category: Excel, Sequence

What I didn´t show you was how to find multiple sequences with this particular array formula.

Find multiple sequences of values

This array formula finds all instances of a sequence. It returns their starting row number.

Array formula in cell F8:

=SMALL(IF(COUNTIFS($E$8, $B$1:$B$23, $E$9, $B$2:$B$24)=1, MATCH(ROW($A$1:$A$23), ROW($A$1:$A$23)), ""), ROW(A1))

Recommended article

Find the longest/smallest consecutive sequence of a value

The array formula in cell D3 returns the the length of longest consecutive sequence of a value in column A.  Cell […]

Comments(5) Filed in category: Excel, Sequence

Look for a multi-level sequence

The next array formula looks for a consequtive values in columns and rows. The picture explains it all.

Find a sequence on multiple columns

Array formula in cell H3:

=MATCH(1,COUNTIFS(F3, A1:A23, F4, A2:A24, G3, B1:B23, G4,B2:B24), 0)

Use this formula if you are looking for the first instance of a sequence. It looks for a specific sequence (LexCorp and Paradise Airlines) in column A and for 604 and 767 in column B. LexCorp and 604 must be on the same row and Paradise Airlines and 767 must be on the next row below.

This formula is quite small, if you compare it to the following formula.

Recommended article

Repeat values

Table of Contents Repeat values Repeat the range according to criteria in loop BatTodor asks: I failed to find right […]

Comments(14) Filed in category: Excel, Sequence

Look for multiple multi-level sequences

Find multiple sequences on multiple columns

Array formula in cell H8:

=SMALL(IF(COUNTIFS($F$8, $A$1:$A$23, $F$9, $A$2:$A$24, $G$8, $B$1:$B$23, $G$9, $B$2:$B$24)=1, MATCH(ROW($A$1:$A$23), ROW($A$1:$A$23)), ""), ROW(A1))

It is like the formula above but it returns the location of multiple sequences.

Recommended article

Locate lookup values in a table [HYPERLINK]

Today I´ll show you how to search a table column and jump to that table cell using the hyperlink function. When […]

Comments(14) Filed in category: Excel, Hyperlinks, Vlookup

Wild card search for a sequence

This demonstrates how to do a wild card search for a sequence. This formula returns the row number of first found sequence in column A. The formula looks for a text string in a cell and another text string in the cell below. You don´t need to enter the wild cards * (asterisks), see cell F3 and F4.

Find a sequence - wildcard search

=MATCH(TRUE, ISNUMBER(FIND($F$11, $A$1:$A$23)*FIND($F$12, $A$2:$A$24)), 0)

insertexcerpt id="1450"]

Wild card search for multiple sequences

This demonstrates how to do wild card searches for multiple sequences. This formula returns the row number of all found sequences in column A. The sequence is in cell F11 and F12.

Find multiple sequences - wildcard search

Array formula in cell G11:

=SMALL(IF(ISNUMBER(FIND($F$11, $A$1:$A$23)*FIND($F$12, $A$2:$A$24)), MATCH(ROW($A$1:$A$23), ROW($A$1:$A$23)), ""), ROW(A1))

If a cell contains "Corp" and the next cell beneath contains "Airlines" the array formula returns the row number.

Search for multiple text strings in multiple cells

Question: How do I search a list for two text strings and return a list with where both strings occurs? […]

Comments(17) Filed in category: Excel, Search and return multiple values

Download excel *.xlsx file

Find a sequence of values.xlsx

Functions in this post

IF function explained

Check if a logical expression is met. Returns a specific value if TRUE and another specific value if FALSE.

Comments(9) Filed in category: Excel

SMALL function and LARGE function

This function lets you extract any number in a cell range based on sort rank.

Comments(12) Filed in category: Excel

MATCH function

Identify the position of a value in an array.

Comments(12) Filed in category: Excel

COUNTIFS function

Checks multiple conditions against the same number of cell ranges and counts how many times all criteria are met.

Comments(1) Filed in category: Excel

SEARCH and FIND functions

Returns a number representing the position a substring is, if found in a textstring. FIND is case sensitive and SEARCH is not.

Comments(3) Filed in category: Excel, Search and return multiple values