ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   average (https://www.excelbanter.com/excel-discussion-misc-queries/151966-average.html)

Andy_Trow

average
 
I want to calculate the average of cells A1, A3, A7, B2 and B5. However, an X
can be in any of the cells as well as a number. How I do this ?

I tried AVERAGE(A1+A3+A7+B2+B5) but I get and error if I have an x in any
cell.

CLR

average
 
=SUM(A1,A3,A5,B2,B5)/COUNT(A1,A3,A5,B2,B5)

Vaya con Dios,
Chuck, CABGx3



"Andy_Trow" wrote:

I want to calculate the average of cells A1, A3, A7, B2 and B5. However, an X
can be in any of the cells as well as a number. How I do this ?

I tried AVERAGE(A1+A3+A7+B2+B5) but I get and error if I have an x in any
cell.


bj

average
 
non adjacent cells give problems in some situations
use a helper row (AA?)
in AA1
=A1
in AA2
=A3
inAA3
=A7
in AA4
=B2
in
AA5
=B5
then use

=average(if(isnumber(AA1:AA5),AA1:AA5))
entered as an array control-shift-enter

"Andy_Trow" wrote:

I want to calculate the average of cells A1, A3, A7, B2 and B5. However, an X
can be in any of the cells as well as a number. How I do this ?

I tried AVERAGE(A1+A3+A7+B2+B5) but I get and error if I have an x in any
cell.


Sloth

average
 
AVERAGE ignores text so X's shouldn't be a problem, however you should be
using commas like this

=AVERAGE(A1,A3,A7,B2,B5)

If you want the X's to count as zero then you can also use AVERAGEA like this

=AVERAGEA(A1,A3,A7,B2,B5)

"Andy_Trow" wrote:

I want to calculate the average of cells A1, A3, A7, B2 and B5. However, an X
can be in any of the cells as well as a number. How I do this ?

I tried AVERAGE(A1+A3+A7+B2+B5) but I get and error if I have an x in any
cell.



All times are GMT +1. The time now is 09:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com