Skip to main content

How to countif a specific value across multiple worksheets?

Supposing, I have multiple worksheets which contains following data, and now, I want to get the number of occurrence of a specific value “Excel” from theses worksheets. How could I count a specific values across multiple worksheet?

doc-count-across-multiple-sheets-1 doc-count-across-multiple-sheets-2 doc-count-across-multiple-sheets-3  2 doc-count-across-multiple-sheets-4

Countif a specific value across multiple worksheets with formulas

Countif a specific value across multiple worksheets with Kutools for Excel


  Countif a specific value across multiple worksheets with formulas

In Excel, there is a formula for you to count a certain values from multiple worksheets. Please do as follows:

1. List all the sheet names which contain the data you want to count in a single column like the following screenshot shown:

doc-count-across-multiple-sheets-5

2. In a blank cell, please enter this formula: =SUMPRODUCT(COUNTIF(INDIRECT("'"&C2:C4&"'!A2:A6"),E2)), then press Enter key, and you will get the number of the value “Excel” in these worksheets, see screenshot:

doc-count-across-multiple-sheets-6

Notes:

1. In the above formula:

  • A2:A6 is the data range that you want to count the specified value across worksheets;
  • C2:C4 is the sheet names list which include the data you want to use;
  • E2 is the criteria that you want based on.

2. If there are multiple worksheets need to be listed, you can read this article How to List Worksheet Names in Excel? to deal with this task.

3. In Excel, you can also use the COUNTIF function to add the worksheet one by one, please do with the following formula: =COUNTIF(Sheet1!A2:A6,D2)+COUNTIF(Sheet10!A2:A6,D2)+COUNTIF(Sheet15!A2:A6,D2), (Sheet1, Sheet10 and Sheet15 are the worksheets that you want to count, D2 is the criteria that you based on), and then press Enter key to get the result. See screenshot:

doc-count-across-multiple-sheets-7


Countif a specific value across multiple worksheets with Kutools for Excel

If you have Kutools for Excel, with its Navigation pane, you can quickly list and count the specific value across multiple worksheet.

Kutools for Excel : with more than 300 handy Excel add-ins, free to try with no limitation in 30 days. 

After installing Kutools for Excel, lease do as follows:

1. Click Kutools > Navigation, see screenshot:

doc-count-across-multiple-sheets-9

doc-count-across-multiple-sheets-10

2. In the Navigation pane, please do the following operations:

(1.) Click Find and Replace button to expand the Find and Replace pane;

(2.) Type the specific value into the Find what text box;

(3.) Choose a search scope from the Whithin drop down, in this case, I will choose Selected Sheet;

(4.) Then select the sheets which you want to count the specific values from the Workbooks list box;

(5.) Check Match entire cell if you want to count the cells match exact;

(6.) Then click the Find All button to list all the specific values from multiple worksheets, and the number of the cells are displayed at the bottom of the pane.

Download and free trial Kutools for Excel Now !


Demo: Countif a specific value across multiple worksheets with Kutools for Excel

Kutools for Excel: with more than 300 handy Excel add-ins, free to try with no limitation in 30 days. Download and free trial Now!


Related articles:

How to use countif to calculate the percentage in Excel?

How to countif with multiple criteria in Excel?

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...

Description


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
Comments (15)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hello, I've used the =SUMPRODUCT(COUNTIF(INDIRECT("'"&C2:C4&"'!A2:A6"),E2)) successfully to total criteria for sheetlists by month for 2023. I want to continue on the same workbook for 2024 and make new sheetlists by month. When i try the above formula with 2024 sheetlists, I get an REF error that i cant figure out how to resolve. Is there any way to resolve the error or do i have to start a new workbook?
This comment was minimized by the moderator on the site
Ik krijg alleen maar foutmeldingen na het kopieren-plakken van het voorbeeld en lezen van de tutorial. Ook na cellen veranderen en dergelijke.

Hoe kan ik de getallen in cellen over meerdere sheets/tabbladen bij elkaar optellen?
This comment was minimized by the moderator on the site
Hi, Leek,
to sum values from multiple worksheets, please apply htis formula: =SUM(Sheet1!B5,Sheet2!B5,Sheet3!B5…)

Notes:
1. In this formula, Sheet1!B5, Sheet2!B5, Sheet3!B5 are the sheet name and cell value that you wan tto sum, if there are more sheets, you just add them into the formula as you need.
2. If the source worksheet name contains a space or special character, it must be wrapped in single quotes. For example: 'New York'!B5

Please try it, hope can help you!
This comment was minimized by the moderator on the site
Thank you. Even though is very long formula, the one that worked the easiest for me was COUNTIF + COUNTIF
This comment was minimized by the moderator on the site
This doesn't work when the sheet name has dashes in them. Anything I can do about it?
This comment was minimized by the moderator on the site
Need a answer very eagerly for this. I have multiple worksheets in our workbook, and I want to count total number for values in a column C for every sheet and that too every sheet wise not a total of every C column of all sheets.
This comment was minimized by the moderator on the site
1*1=1 but from 2 it should be 3 double. how i set up in excel? please give me a solution.
This comment was minimized by the moderator on the site
This was extremely helpful. the below formula is what i use to track all my employees Vacation,Sick,Personal,LOA days. I have tabs for every month of the year and use this to track how many days they have used. All i do is change the "V" to a "S" or "P". Formula works perfect! thanks for the info....

=COUNTIF(January!B16:AF16,"V")+COUNTIF(February!B16:AF16,"V")+COUNTIF(March!B16:AF16,"V")+COUNTIF(April!B16:AF16,"V")+COUNTIF(May!B16:AF16,"V")+COUNTIF(June!B16:AF16,"V")+COUNTIF(July!B16:AF16,"V")+COUNTIF(August!B16:AF16,"V")+COUNTIF(September!B16:AF16,"V")+COUNTIF(October!B16:AF16,"V")+COUNTIF(November!B16:AF16,"V")+COUNTIF(December!B16:AF16,"V")
This comment was minimized by the moderator on the site
I want to count specific word in Coloum accross the Jan to Dec, Please advice and sum it up
This comment was minimized by the moderator on the site
Hi. Using this formula:
=SUMPRODUCT(COUNTIF(INDIRECT("'"&C2:C4&"'!A2:A6"),E2))

I get a Ref error if Column C has more than 9 rows. In other words, INDIRECT("'"&C2:C9&"'!A2:A6"),E2)), is OK but INDIRECT("'"&C2:C10&"'!A2:A6"),E2)) is not.
How do I avoid this error?
This comment was minimized by the moderator on the site
How would I write the formula above (=SUMPRODUCT(COUNTIF(INDIRECT("'"&C2:C4&"'!A2:A6"),E2))) if I had to use the COUNTIFS function? Right now I have to see if certain cells have met 2 to 3 criteria (across multiple worksheets). cheers for you help.
This comment was minimized by the moderator on the site
try =SUMPRODUCT(COUNTIFS(INDIRECT("'"&C2:C4&"'!A2:A6"),E2),(INDIRECT("'"&C2:C4&"'!A2:A6"),X2),(INDIRECT("'"&C2:C4&"'!A2:A6"),Y2)) where E2, X2 and Y2 are your criteria and INDIRECT("'"&C2:C4&"'!A2:A6" are your criteria range, where C2:C4 are your tab names and A2:A6 is your data range let me know if it works I'm actually very curious, didn't have time to run and test it myself. I just had to use one criteria so above easier formula did work wonders for me
This comment was minimized by the moderator on the site
Can you not specify your range of cells within a RANGE of sheets instead of "sheet1+sheet2+sheet3...." and specify a range to compare to like: countif(sheet1:sheet5!b:b, a:a)
This comment was minimized by the moderator on the site
tried it, didn't work. you need your tab(sheet) names in the cells for it to work. The cells are actually making up a range themselves, hence C2:C4 in the formula
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations