Forum Discussion
Malcolm Campbell
Sep 18, 2018Copper Contributor
Calculating averages (percents) within a date range. Answer come back #DIV/0.
Calculating average percent complete for construction activities. If the activities are not applicable I enter N/A. If all the activities are N/A, the average result comes back as #DIV/0? I would like the result to be zero (0%). How can I achieve this with the average formula?
- Haytham AmairahSilver Contributor
Hi Malcolm,
You can wrap the AVERAGE function with the IFERROR function like the below example:
=IFERROR(AVERAGE(B1:B3),0)
Hope that helps
- Haytham AmairahSilver Contributor
Also, you can use this formula instead:
=IF(COUNT(B1:B3)=0,0,AVERAGE(B1:B3))