The workbook shown in the example has four worksheets in total.

This formula works but becomes cumbersome as the number of sheets increases.

One of these quirks is that you might’t use a 3D reference for therangeargument.

Sample data - 1000 random names in each sheet

This approach helps streamline the formula as explained below.

INDIRECT will evaluate the text values and pass the references into COUNTIF as therangeargument.

For reasons that are somewhat mysterious, COUNTIF will accept the result from INDIRECT without complaint.

Sample data - 1000 random names in each sheet

Note that INDIRECT is avolatile functionand can impact workbook performance.

This is an example of usingBoolean logic, a common way to solve more complicated problems in Excel.

Each subsequent array is appended to the bottom of the previous array….

Sample data - 1000 random names in each sheet

Sample data - 1000 random names in each sheet

Sample data - 1000 random names in each sheet

Excel formula: Search entire worksheet for value

Excel formula: Search multiple worksheets for value

Excel COUNTIF function

Excel SUMPRODUCT function

Excel VSTACK function

Sample data - 1000 random names in each sheet