| A | B | C | D | E | F | G | H | I | J | K | |
|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Copyright: Cheat Sheets LLC (CheatSheets.blog) | ||||||||||
2 | |||||||||||
3 | Avoid COUNTA False Positive with IFERROR | ||||||||||
4 | COUNTA ( IFERROR ( FILTER ( return_range , criteria_range = criteria ) ) ) | ||||||||||
5 | |||||||||||
6 | The example at left uses the above formula, which fixes the false positive issue. The example on the right does not fix the issue. And yes, in this simple example you could just use "COUNTIFS". But, believe me, you'll quickly come across more comlpex scenarios, where COUNTA + FILTER is a better solution | ||||||||||
7 | |||||||||||
8 | CORRECT OUTPUT | INCORRECT OUTPUT (FALSE POSITIVES!) | |||||||||
9 | |||||||||||
10 | Date Range - On or After | 2019-08-15 | Date Range - On or After | 2019-08-15 | |||||||
11 | Date Range - Before | 2019-10-01 | Date Range - Before | 2019-10-01 | |||||||
12 | |||||||||||
13 | Product | Count | Product | Count | |||||||
14 | duct tape | 4 | duct tape | 4 | |||||||
15 | hammer | 7 | hammer | 7 | |||||||
16 | handsaw | 0 | handsaw | 1 | |||||||
17 | pliers | 0 | pliers | 1 | |||||||
18 | sander | 2 | sander | 2 | |||||||
19 | screwdriver | 7 | screwdriver | 7 | |||||||
20 | wrench | 14 | wrench | 14 | |||||||
21 | |||||||||||
22 | |||||||||||