Hi wondering if anyone can help me with this one...
Have 31 cells in a row which i want to get the average value from, some of
these 31 cellsmay or may not have data in them. The end coloum would be the
one working out the average value of that row of cells.
If no data is entered into any of the cells is it possible to get the
average formular not to return a #div/0 error but instead just return a 0
figure?
Obviously as soon as any data is entered the formular would work as normal
but just want it not to return the error should no data be entered.
The average figures obtained would then be used in a graph.
sure must be a plain and simple answer to this..
Dean
JE McGimpsey - 01 May 2007 15:51 GMT
One way:
=IF(COUNT(A1:A31)>0,AVERAGE(A1:A31),0)
> Hi wondering if anyone can help me with this one...
>
[quoted text clipped - 12 lines]
> sure must be a plain and simple answer to this..
> Dean
Pete_UK - 01 May 2007 15:53 GMT
Try this:
=IF(COUNT(A1:AE1)=0,0,AVERAGE(A1:AE1))
Hope this helps.
Pete
> Hi wondering if anyone can help me with this one...
>
[quoted text clipped - 12 lines]
> sure must be a plain and simple answer to this..
> Dean
bpeltzer - 01 May 2007 15:55 GMT
=if(count(a1:a5)=0,"",average(a1:a5)).
This will first check if there are any numbers in the range. If not, leave
the result blank; if so, average those numbers.
--Bruce
> Hi wondering if anyone can help me with this one...
>
[quoted text clipped - 12 lines]
> sure must be a plain and simple answer to this..
> Dean
dinouk - 01 May 2007 20:51 GMT
spot on - works a treat guess i was missing the most obvious way
thanks again
> =if(count(a1:a5)=0,"",average(a1:a5)).
> This will first check if there are any numbers in the range. If not, leave
[quoted text clipped - 17 lines]
> > sure must be a plain and simple answer to this..
> > Dean
Dave Thomas - 15 Jul 2007 22:14 GMT
If your data is in cells A1 through AE1, 31 cells, then you could use:
=IF(ISERROR(AVERAGE(A1:AE1)),0,AVERAGE(A1:AE1))
The ISERROR function will catch any kind of error, not just division by zero
, #DIV/0.
> Hi wondering if anyone can help me with this one...
>
[quoted text clipped - 13 lines]
> sure must be a plain and simple answer to this..
> Dean
Rick Rothstein (MVP - VB) - 15 Jul 2007 22:22 GMT
Are you answering old messages from old threads? Your last two postings seem
to be answering questions from back on May 1st and May 2nd. Is that how your
newsreader is showing them to you?
Rick
> If your data is in cells A1 through AE1, 31 cells, then you could use:
> =IF(ISERROR(AVERAGE(A1:AE1)),0,AVERAGE(A1:AE1))
[quoted text clipped - 20 lines]
>> sure must be a plain and simple answer to this..
>> Dean
T. Valko - 15 Jul 2007 22:39 GMT
Another way:
=IF(COUNT(A1:AE1),AVERAGE(A1:AE1),0)

Signature
Biff
Microsoft Excel MVP
> If your data is in cells A1 through AE1, 31 cells, then you could use:
> =IF(ISERROR(AVERAGE(A1:AE1)),0,AVERAGE(A1:AE1))
[quoted text clipped - 20 lines]
>> sure must be a plain and simple answer to this..
>> Dean