Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
LostNFound
 
Posts: n/a
Default Using the average function

I am using the average function! But when there is no data in the cells to
average it returns the #DIV?0! how can I avoid this I would like it to be
blank
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

=IF(SUM(A1:A4)=0,"",AVERAGE(A1:A4))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"LostNFound" wrote in message
...
I am using the average function! But when there is no data in the cells to
average it returns the #DIV?0! how can I avoid this I would like it to be
blank



  #3   Report Post  
Jason Morin
 
Posts: n/a
Default

One way:

=IF(COUNT(A1:A10),AVERAGE(A1:A10),"")

HTH
Jason
Atlanta, GA

-----Original Message-----
I am using the average function! But when there is no

data in the cells to
average it returns the #DIV?0! how can I avoid this I

would like it to be
blank
.

  #4   Report Post  
Myrna Larson
 
Posts: n/a
Default

Hi, Bob:

How about COUNT instead of SUM?


On Tue, 15 Mar 2005 16:19:27 -0000, "Bob Phillips"
wrote:

=IF(SUM(A1:A4)=0,"",AVERAGE(A1:A4))


  #5   Report Post  
Bob Phillips
 
Posts: n/a
Default

Hi Myrna,

I thought about that after I sent it, especially as I thought that if there
were a similar negative and positive numbers, that would still SUM to 0. But
I then thought, it would also AVERAGE to 0, so does it really matter. So I
thought about it (ooh, for at least 10 secs), decided there was no real
disadvantage to SUM, so said no more. You can't even get rid of the =0 part
by inverting it,=IF(SUM(A1:A4),AVERAGE(A1:A4),"") so there is no loss there.

Can you think of a case where SUM would cause a problem?


"Myrna Larson" wrote in message
...
Hi, Bob:

How about COUNT instead of SUM?


On Tue, 15 Mar 2005 16:19:27 -0000, "Bob Phillips"
wrote:

=IF(SUM(A1:A4)=0,"",AVERAGE(A1:A4))






  #6   Report Post  
Adam
 
Posts: n/a
Default

couldnĀ“t you use
IF(isblank(A1:A10),"",average(A1:A10))?

"Bob Phillips" skrev:

Hi Myrna,

I thought about that after I sent it, especially as I thought that if there
were a similar negative and positive numbers, that would still SUM to 0. But
I then thought, it would also AVERAGE to 0, so does it really matter. So I
thought about it (ooh, for at least 10 secs), decided there was no real
disadvantage to SUM, so said no more. You can't even get rid of the =0 part
by inverting it,=IF(SUM(A1:A4),AVERAGE(A1:A4),"") so there is no loss there.

Can you think of a case where SUM would cause a problem?


"Myrna Larson" wrote in message
...
Hi, Bob:

How about COUNT instead of SUM?


On Tue, 15 Mar 2005 16:19:27 -0000, "Bob Phillips"
wrote:

=IF(SUM(A1:A4)=0,"",AVERAGE(A1:A4))





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using The Average Function if a cell has NA carl Excel Worksheet Functions 6 May 21st 23 08:46 PM
Average Function help Cheech Excel Worksheet Functions 4 January 24th 05 04:44 PM
How do I nesting subtotal function within average function in Exc Amy Yeh Excel Worksheet Functions 4 January 19th 05 07:23 PM
Average function with If Danny Excel Worksheet Functions 2 December 3rd 04 07:27 PM
Using Average function when number is zero Deb Excel Worksheet Functions 3 November 6th 04 02:01 AM


All times are GMT +1. The time now is 05:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"