change:
avg = avg / N
to:
If N > 0 Then avg = avg / N
?
It's balking at a division by 0.

later...
Quote Originally Posted by jnmonroe View Post
Rather than outputting a zero when the bin range does not contain a frequency value, it's probably more appropriate for the VBA to output a blank.
OK.. change:
avg = avg / N
Cells(c + 3, 8) = avg
to one line
  If N > 0 Then Cells(c + 3, 8) = avg / N Else Cells(c + 3, 8) = Empty