ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Average (https://www.excelbanter.com/excel-worksheet-functions/204093-average.html)

Alexey[_2_]

Average
 
Hi
I have three cells O28,O29,O30. In cell O27 I want to display the average
of the other three cells, but only if they have values in them.

Not sure how to do this

A



Mike H

Average
 
Hi,

Average ignores blank/text cells in the range so
=AVERAGE(O28:O30)

May do what you want. If you want to ignore zero then use this
=AVERAGE(IF(O28:O30<0,O28:O30,FALSE))

The second is an array formula and must be commited using CTRL+Shift+Enter
and not just enter. If you do it correctly then Excel will put curly brackets
around the formula {}. You can't type these yourself.

Mike

"Alexey" wrote:

Hi
I have three cells O28,O29,O30. In cell O27 I want to display the average
of the other three cells, but only if they have values in them.

Not sure how to do this

A




David Biddulph[_2_]

Average
 
=IF(COUNT(O28:O30)=0,"",AVERAGE(O28:O30)) if you want the average if *any*
of the cells have values.
=IF(COUNT(O28:O30)<3,"",AVERAGE(O28:O30)) if you want the average only if
*all* of the cells have values.
--
David Biddulph

"Alexey" wrote in message
...
Hi
I have three cells O28,O29,O30. In cell O27 I want to display the average
of the other three cells, but only if they have values in them.

Not sure how to do this

A





Alexey[_2_]

Average
 
Thanks Both

A




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

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