AVERAGEIF(column,"<>0) giving error #DIV/0!

msmith3

New Member
Joined
Feb 1, 2022
Messages
8
Office Version
  1. 2013
Platform
  1. Windows
I have a table with 20 rows and only 6 rows have data in them. I'm trying to get the average of only the rows containing data in a column. Can anyone help me figure out why I'm getting an error on this formula?

Example:
Sam5
Jess2
Dean4
Michael4
 

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
Follow-up question: if one of the cells that I'm averaging contains an error such as "#VALUE!", how can I still find the average? I'd like the formula to be the same for each column, whether they have zeros, errors, or no problems.
Would this formula do that? =IFERROR(AVERAGEIF(Table[Q1],"<>0"),AGGREGATE(1,6,Table[Q1]))
 
Last edited:
Upvote 0
Are you going to have any actual 0 values in that column that you want to skip? As opposed to empty cells? If not, just use:

Excel Formula:
=AGGREGATE(1,6,Table[Q1]))

If you do have actual 0's that you want to skip, then your proposed formula would include them if there were another error in the column. You'd need to do something like this:

Excel Formula:
=AVERAGE(IFERROR(1/(1/Table[Q2]),""))

confirmed with Control+Shift+Enter.
 
Upvote 0

Forum statistics

Threads
1,216,090
Messages
6,128,765
Members
449,467
Latest member
sdafasfasdf

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