Forum Discussion
injuredfinch
Apr 21, 2021Copper Contributor
COUNTIF Function
Hello I am having trouble understanding how to properly use the COUNTIF function. I am on PC/Windows 10. Microsoft 365 Apps for enterprise, Version 2103 (Build 13901.20400 Click-to-Run) I could...
Rajesh_Sinha
Apr 21, 2021Iron Contributor
There are several ways you can use to COUNT across sheets.
- I would like to suggest few example:
=SUMPRODUCT(COUNTIF(INDIRECT({"'First'!A1:E10";"'Second'!A1:E10";"'Third'!A1:E10";
"'Fourth'!A1:E10"}),F1))
N.B.
- Where A1:E10 has values to count, F1 has the Criteria.
- Another is:
=SUMPRODUCT(COUNTIF(INDIRECT("'"&A2:A4&"'!B2:B10"),E2))
N.B.
- Where A2:A4 is range has the Sheet Name, and B2:B10 has values to count, E2 has the Criteria.
One more is:
=SUMPRODUCT(COUNTIF(INDIRECT("'"&SheetName&"'!A2:D100"),E2))
N.B.
- Where the SheetName is Named Range has Sheet Name, and A2:D100 has values to count, E2 has the Criteria.
- Adjust cell references in the formula as needed.