# How to Countif across Multiple Worksheets

This post will guide you count a value across multiple worksheets in excel 2013/2016/2019/365. How do I use COUNTIF function to get the number of occurrence of a value from multiple worksheets in Excel. How to count the number of values from multiple worksheets in Excel. How to count based on a single criteria across multiple sheets.

## 1. Countif across Multiple Worksheets

Assuming that you have three worksheets in your current workbook, and you want to count the number of a specified text string “excel” in same range B1:B4 across those three worksheets. How to achieve it. You can do the following steps:

Step1: type all three worksheet names in one single column.

Step2: type the following formula into a blank cell, and press Enter key.

``=SUMPRODUCT(COUNTIF(INDIRECT("'"&D1:D3&"'!B1:B4"),"excel"))``

Step3: the number of text string “excel” in the same range B1:B4 among three worksheet (sheet1, sheet2 and sheet3) has been calculated in cell E1.

## 2. Sum Cells Across Multiple Worksheets

To calculate cells across multiple worksheets in your Microsoft Excel, you can use the SUM function.

Assuming that you want to sum cells among Sheet1 and Sheet3, and you can do the following steps:

Step1: Open your Excel workbook and navigate to the worksheet where you want to display the count result.

Step2: select one blank cell where you want the count result to appear, enter the following formula:

``=SUM(Sheet1:Sheet3!A1:A4)``

Note: you just need to replace Sheet1 and Sheet3 with the names of the worksheets you want to include in the count.  and adjust the range A1:A4 to cover the specific range of cells you want to count.

Step3: Press Enter key to calculate the count. The formula will sum the counts from the specified range in each worksheet.

Note: You need to add the exclamation mark (!) between the worksheet names and the cell range. And you also need to ensure that the worksheets you want to include are in the same workbook.

## 3. Video: How to COUNTIF across Multiple Worksheets in Excel

This below video will demonstrate you how to effectively use the COUNTIF function in combination with SUM function to count values across multiple worksheets (Sheet1~Sheet3) in the Microsoft Excel 2016/2019/365.

## 4. Related Functions

• Excel SUMPRODUCT function
The Excel SUMPRODUCT function multiplies corresponding components in the given one or more arrays or ranges, and returns the sum of those products.The syntax of the SUMPRODUCT function is as below:= SUMPRODUCT (array1,[array2],…)…
• Excel INDIRECT function
The Excel INDIRECT function returns the cell reference based on a text string, such as: type the text string “A2” in B1 cell, it just a text string, so you can use INDIRECT function to convert text string as cell reference….
• Excel COUNTIF function
The Excel COUNTIF function will count the number of cells in a range that meet a given criteria. This function can be used to count the different kinds of cells with number, date, text values, blank, non-blanks, or containing specific characters.etc.= COUNTIF (range, criteria)…