help with AVERAGE problem

Dwise85

New Member
Joined
Nov 16, 2018
Messages
17
Hi,

I am trying to find the average in a column. If there is not data in that column I went to reference the data in another cell and use that as "the average" for that column. Any help would be greatly appreciated!

for example:
column 1 cells A1:A8 are averaged in A9, column 2 cells B1:B8 are averegd in B9, column C cells C1:C8 are averaged in C9 but all cells are blank and returing a #div/0!. if this is the case I want to use the data that is in E6 and and use that as the average if this is the case.


9

9
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Hi,

You can just wrap your formula with IFERROR:

=IFERROR(AVERAGEIF(D2:D8,"<>0"),H6)
 
Upvote 0
Welcome to the forum.

How about:

Code:
=IFERROR(AVERAGE(D2:D8),$H$6)

AVERAGEIF may not be required, since AVERAGE ignores empty cells.
 
Upvote 0
You're welcome, welcome to the forum.
 
Upvote 0

Forum statistics

Threads
1,224,830
Messages
6,181,225
Members
453,025
Latest member
Hannah_Pham93

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