In Excel 365, you’re free to use the REDUCE function to streamline the formula somewhat.

The formulas for all three approaches are below.

Note: This formula is complicated by the “contains” requirement.

Excel formula: Count cells not equal to many things

Numbers represent the position of a found text string, and errors represent text strings not found.

The TRANSPOSE function is needed to generate the 10 x 3 array of complete results.

Zeros indicate no excluded strings were found.

Excel formula: Count cells not equal to

We do this by subtracting the array from 1.

This is an example ofboolean logic.

SEARCH Function

The Excel SEARCH function returns the location of one text string inside another.

Excel formula: Count cells not equal to x or y

SEARCH returns the position offind_textinsidewithin_textas a number.

The result from MMULT is anarraythat contains the same number of rows asarray1and the same number of columns asarray2.

Excel formula: Count not equal to multiple criteria

Excel ISNUMBER function

Excel SEARCH function

Excel MMULT function

Excel TRANSPOSE function

Excel REDUCE function