|COUNTIF deos not allow 3D references and therefore cannot be used across multiple sheets.|
There are (at least) 3 options:
1 - The Brute Force Formula Method:
2 - The More Elegant Formula Method:
where e.g. A1:A3 contain the Sheet Names for the sheets that you are interested in.
3 - The User Defined Function (UDF) method using VBA:
Function myCountIf(myRng As Range, myData) As Long
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
myCountIf = _
myCountIf + WorksheetFunction.CountIf(ws.Range(myRng.Address), myData)
This UDF will COUNTIF across all sheets in the workbook. If you need to exclude some sheets there are ways to do that, but we would need more details.
Let us know which method works best for you.
Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.