Error formula to also include blanks for zeros
Hi - I currently have a formula wrapped with the IFERROR to return blank if an error is calculated. I would also like it to be wrapped to return a blank for zeros as well. Any thoughts? Here is my formula:
=IFERROR(COUNTIFS({OS}, OS@row, {Level}, "Unify", {Project Status}, "Complete", {Project Type}, "Database", {Completion Date}, AND(IFERROR(YEAR(@cell), "") = PK$13)), "")
Answers
-
Try something like this...
=IFERROR(IF(COUNTIFS({OS}, OS@row, {Level}, "Unify", {Project Status}, "Complete", {Project Type}, "Database", {Completion Date}, AND(IFERROR(YEAR(@cell), "") = PK$13) > 0, COUNTIFS({OS}, OS@row, {Level}, "Unify", {Project Status}, "Complete", {Project Type}, "Database", {Completion Date}, AND(IFERROR(YEAR(@cell), "") = PK$13))), "")
-
Hi Paul - thanks. I tried this, but I'm getting a #incorrect argument set error.
-
Ok. Here is the idea behind it (and I will redo it in steps this time to make sure I didn't miss something the first time).
First we take your original COUNTIFS:
COUNTIFS({OS}, OS@row, {Level}, "Unify", {Project Status}, "Complete", {Project Type}, "Database", {Completion Date}, AND(IFERROR(YEAR(@cell), "") = PK$13))
And now I see a little tweak to be made. We don't need the AND statement, so here it is trimmed down a touch...
COUNTIFS({OS}, OS@row, {Level}, "Unify", {Project Status}, "Complete", {Project Type}, "Database", {Completion Date}, IFERROR(YEAR(@cell), "") = PK$13)
Now we take our COUNTIFS and say that if it is greater than zero, run it. Leaving the 3rd portion of the IF statement out will automatically generate a blank for anything that is not greater than zero.
IF(COUNTIFS({OS}, OS@row, {Level}, "Unify", {Project Status}, "Complete", {Project Type}, "Database", {Completion Date}, AND(IFERROR(YEAR(@cell), "") = PK$13)) > 0, COUNTIFS({OS}, OS@row, {Level}, "Unify", {Project Status}, "Complete", {Project Type}, "Database", {Completion Date}, AND(IFERROR(YEAR(@cell), "") = PK$13)))
Now we drop that back into the IFERROR statement, and that should be working.
=IFERROR(IF(COUNTIFS({OS}, OS@row, {Level}, "Unify", {Project Status}, "Complete", {Project Type}, "Database", {Completion Date}, AND(IFERROR(YEAR(@cell), "") = PK$13)) > 0, COUNTIFS({OS}, OS@row, {Level}, "Unify", {Project Status}, "Complete", {Project Type}, "Database", {Completion Date}, AND(IFERROR(YEAR(@cell), "") = PK$13))), "")
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 140 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!