![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Location: home
Posts: 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? |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
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 ] |
|
|
|
|
|
#3 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
=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 |
|
|
|
|
|
|
#4 |
|
New Member
Join Date: Mar 2002
Location: home
Posts: 11
|
thanks@ ill try it out.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|