Divide by Zero Error With AVG(COLLECT(...

Partcheasy
edited 09/05/24 in Formulas and Functions

Hoping someone can help because I am totally twisted with this one. I don't use AVG(COLLECT very often so I may be missing something simple here… What I'm trying to do is take the average of Column17 where both the year (Column22) and the weekday (Column9) match the year and weekday that I've indicated in Column21. (Yes I am going to rename all of these columns to something more helpful, just wanted to workshop this a bit first).

I am able to average Column17 no problem with the standard AVG function, so there doesn't appear to be any problem data there, and both column9 and column22 have no errors or anything that I think would cause an issue. Any help would be greatly appreciated!

Also, FYI there are many instances of the data in Column17 further down not being blank, and also matching the criteria I'm asking it for.

The error that I am getting which you can see is #DIVIDE BY ZERO

Formula below, but also inserted here:

=AVG(COLLECT($[Column17]$1:$[Column17]$2497, $[Column9]$1:$[Column9]$2497, [Column21]@row, $[Column22]$1:$[Column22]$2497, $[Column21]$8))

Best Answer

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!