Averaging a set of fields in which there are #DIV/0! errors

marshallh

New Member
Joined
Jul 18, 2022
Messages
3
Office Version
  1. 365
Platform
  1. MacOS
I am attempting to average most of a column of numbers. That column is made up of a series of cells that attempt to average a pair of cells on each of their respective rows.

I do not yet have a complete set of data for those cells to average. I may never get them. So some of those initial fields are just empty. So in cell E7 =AVERAGE(C7:D7) is currently returning #DIV/0! because both C7 and D7 are empty. Though the error is annoying, it being there isn't the big issue.

The issue is that I want to average the cells in the E column that do have real numbers in them and effectively ignore the fields that return #DIV/0!. I feel like the solution is some simple kind of IFERROR thing. But I admit to being a real novice in Excel.
 

Attachments

  • Screen Shot 2022-07-18 at 1.38.13 PM.png
    Screen Shot 2022-07-18 at 1.38.13 PM.png
    59.7 KB · Views: 17

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Hi & welcome to MrExcel.
In E7 use
Excel Formula:
=IFERROR(AVERAGE(C7:D7),"")
 
Upvote 0
Just for my own edification, we are nesting the average function inside the iferror function with the use of parentheses, but dont the empty quotes just tell the cell to return "nothing" if there is an error? And is "if there is no error, just do the nested function" somehow implied? How does it know to actually perform the function on the cells that that dont return an error?

And last question in the cell that averages the averages (E25 in this case), why doesn't it return a #DIV/0! error given that now many of the fields above it are returning (effectively) blank fields?
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,875
Members
452,363
Latest member
merico17

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