How to return a BLANK if we have a BLANK cell using a COUNTIFS formula
This formula is currently working, and it is returning how many items are reviewed for each "Project Lead".
The first part of the formula is basically saying that we would count them, as long as we have a "Reviewer" name added in the "Reviewer" column.
=IFERROR(COUNTIFS(Reviewer:Reviewer, <>"", [Project Lead]:[Project Lead], [Project Lead]@row), "")
The problem is that if I have NO "Reviewer" listed in the "Reviewer" field, and NO "Project Lead" listed in the "Project Lead" row, it returns "0".
I would like to update the same formula, that if the "Project Lead" field is BLANK, to return a BLANK value in the count and NOT "0" as it does today.
Best Answers
-
@Filippo, the most inelegant but dead simple thing to do is this:
=IF(IFERROR(COUNTIFS(Reviewer:Reviewer, <>"", [Project Lead]:[Project Lead], [Project Lead]@row), "")=0, "", IFERROR(COUNTIFS(Reviewer:Reviewer, <>"", [Project Lead]:[Project Lead], [Project Lead]@row), ""))
Simplified, it's just this:
=IF(<your formula> = 0, "", <your formula>)
-
Very clever Lucas! Simple IF statement logic. It works perfectly, thanks!!!
Answers
-
@Filippo, the most inelegant but dead simple thing to do is this:
=IF(IFERROR(COUNTIFS(Reviewer:Reviewer, <>"", [Project Lead]:[Project Lead], [Project Lead]@row), "")=0, "", IFERROR(COUNTIFS(Reviewer:Reviewer, <>"", [Project Lead]:[Project Lead], [Project Lead]@row), ""))
Simplified, it's just this:
=IF(<your formula> = 0, "", <your formula>)
-
Very clever Lucas! Simple IF statement logic. It works perfectly, thanks!!!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 497 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!