Average Returns a Div/0 error

antsaresocrazy

New Member
Joined
Apr 7, 2013
Messages
2
i tried searching for this, but couldn't find a good explanation for my particular problem. All the others involve simple averaging, but nothing that excludes zeros. I tried pasting my formula in place of the simple averages but excel does not approve. And because most of the answers I've looked at don't have explanations, I can't reason my way any closer...

I am using excel 2008 on my mac, and I'm trying to create an average that only includes numbers that are greater than zero. (Its a spreadsheet for finances, so I don't want to include the future months in my average.)

The average is working correctly, as long as there is at least one number there. However, if there are no numbers in any field, then I'm getting the Div/0 error. I wouldn't care so much, except that there are other formulas that are dependent on that one, and those sums all return the Div/0 error.

Here is a screen shot of what I've got going on. The monthly values are pulled from separate monthly input tabs.

0


The Formula in the "Average" column, and the top row is

=(SUM(B14:M14))/(COUNTIF(B14:M14,">0"))

This Formula works perfectly, and so does the next one down. Is there a way I can change my formula to return a dash or on the third row down?

I've been working with this for a bit and I can't seem to figure out the proper sequence or something...

Thanks in advance!

John
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Hi John,

I can't seem to see the screenshot you've attached but at first glance at this the =IFERROR formula should be your friend here.

If you stick your formula within that you can dictate what to display when there is no data in the cells thus giving a div/0 error.

=IFERROR((SUM(B14:M14))/(COUNTIF(B14:M14,">0")),"Insert alternative here")

If you simply want a 0 when there is no data then don't enter an argument for the value if error.

Any questions let me know.
 
Upvote 0

Forum statistics

Threads
1,226,739
Messages
6,192,739
Members
453,754
Latest member
milestogo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top