Divide by Zero Message and IFERROR formula
I am getting a Divide by Zero Message when putting in this formula. It is correct because there are no items that fit this criteria to average.
=AVG(COLLECT({Credit Granting Article Tracker Compliance}, {Credit Granting Article Tracker Month Completed}, "2", {Credit Granting Article Tracker Major?}, "No"))
I attempted to add a IFERROR formula but I am not sure where to add it or how to get it to work. If I add it at the beginning, it comes back as #INCORRECT ARGUMENT.
=IFERROR(AVG(COLLECT({Credit Granting Article Tracker Compliance}, {Credit Granting Article Tracker Month Completed}, "2", {Credit Granting Article Tracker Major?}, "No", "-")))
Am I putting the IFERROR in the wrong place or is there a better way to do this?
Any help with this would be greatly appreciated!!
Kristie Diersen 😀
Best Answer
-
Hi Kristie,
So if I understand correctly, in the event that the first formula results in a divide by zero error, you'd like the formula to return "-" correct? If so, the problem with your formula is you need to close the parenthesis for both the AVG and Collect functions after "No", and not at the end. Here is an updated version of your formula that should work.
=IFERROR(AVG(COLLECT({Credit Granting Article Tracker Compliance}, {Credit Granting Article Tracker Month Completed}, "2", {Credit Granting Article Tracker Major?}, "No")), "-")
Hope this helps! Let me know if you have any questions.
Best,
Mike
Answers
-
Hi Kristie,
So if I understand correctly, in the event that the first formula results in a divide by zero error, you'd like the formula to return "-" correct? If so, the problem with your formula is you need to close the parenthesis for both the AVG and Collect functions after "No", and not at the end. Here is an updated version of your formula that should work.
=IFERROR(AVG(COLLECT({Credit Granting Article Tracker Compliance}, {Credit Granting Article Tracker Month Completed}, "2", {Credit Granting Article Tracker Major?}, "No")), "-")
Hope this helps! Let me know if you have any questions.
Best,
Mike
-
That worked. I had a feeling it was a simple error. Thank you so much!
Kristie Diersen 😀
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!