Help - Easy Also - AverageA

moosemessier

New Member
Joined
Mar 3, 2002
Messages
11
I am doing an "averagea" spreadsheet in which information is passed on to other cells on other worksheets once entered.
however - when an empty cell is passed on - the other sheet cannot average because you cannot divide by zero.

what can i do?
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Use the AVERAGE worksheet function with...

{=AVERAGE(IF(A1:A5),A1:A5)}

Note: This is an array formula which must be entered using the Control+Shift+Enter key combination. The outermost braces, { }, are not entered by you -- they're supplied by Excel in recognition of a properly entered array formula.
This message was edited by Mark W. on 2002-03-05 13:06
 
Upvote 0
On 2002-03-05 12:57, moosemessier wrote:
I am doing an "averagea" spreadsheet in which information is passed on to other cells on other worksheets once entered.
however - when an empty cell is passed on - the other sheet cannot average because you cannot divide by zero.

what can i do?

If the range you want to average does not contain negative numbers, you can just use:

=SUM(A1:A9)/MAX(1,COUNTIF(A1:A9,">0"))

Otherwise use:

=SUM(A1:A9)/MAX(1,COUNTIF(A1:A9,">0")+COUNTIF(A1:A9,"<0"))

Aladin
 
Upvote 0

Forum statistics

Threads
1,214,516
Messages
6,119,979
Members
448,934
Latest member
audette89

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