Getting an average from a range

Supersmithy

Board Regular
Joined
Feb 5, 2012
Messages
81
Hi,

Quite a simple one and I'm sure there must be a simple solution.

I'm trying to do the following;

=AVERAGE(G7/E7,G8/E8,G9/E9,G10/E10,G11/E11,G12/E12,G13/E13)

This works fine when all the cells have numbers in them from which to average, but on occasion any number of the cells can be empty and this returns a DIV, divide by empty error.

How can I overcome this and get just an average from the cell pairings that have numbers in them? I don't want to constantly adjust the range if I can help it.

Thanks
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Hi,
try the array formula (You have to accept it Ctrl+Shift+Enter):
Code:
=AVERAGE(IF(ISERROR(G7:G13/H7:H13);"";G7:G13/H7:H13))
Best regards.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,207,387
Messages
6,078,200
Members
446,321
Latest member
thecachingyeti

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