The left part tests column headers, and the right tests values.

The result from MATCH is anarraycomposed of #N/A errors or numbers.

The numbers indicate matched positions:

There are 6 items in this array because we are testing 6 columns.

Excel formula: Sum matching columns

The numbers represent matched columns and errors represent columns that do not match.

This completes the column matching logic.

When the logic is separated into separate arrays, anadditional stepmust be taken to convert to 1s and 0s.

Excel formula: Sum matching columns and rows

For more details, seeWhy SUMPRODUCT?

Contains logic

In the example shown above testing logic is “equal to”.

But sometimes you’re gonna wanna test with “contains” logic.

Excel formula: Sum every nth column

For example, test for values thatcontain"z" orcontain"c".

MATCH supports approximate and exact matching, andwildcards(* ?)

SEARCH returns the position offind_textinsidewithin_textas a number.

Excel formula: Sum columns based on adjacent criteria

SEARCH supports wildcards, and isnotcase-sensitive….

Excel formula: Copy value from every nth column

Excel SUMPRODUCT function

Excel ISNUMBER function

Excel MATCH function

Excel SEARCH function