ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   sum of cells (https://www.excelbanter.com/excel-programming/353434-sum-cells.html)

Gee-off

sum of cells
 
I know how to do the sum of cells:

In cell -- c18, I have the formual "=average(c3:c17)"

My question is, if there is not value entered in one of those cells, how do
I get it to not add it in? I want C18 to omit the cells (as part of the
average) if it is blank, and only add in the average if something is entered.
(SEE EXAMPLE BELOW) I would want the average of only c6 & c7 (which in this
case is 5), since they have a number entered. I only want cell c8 to be
included if there is a number. In other words, I do not want the average to
drop if there is nothing entered.

For Example:

c6=5
c7=5
c8=(nothing entered)

Any help would be much appreciated. Thank you.

daddylonglegs[_14_]

sum of cells
 

The average function ignores blank cells by default - in your example

=average(c6:c8) should give a result of 5


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=512932


Gee-off

sum of cells
 
Never mind, I am an idiot. I figured out I already have the answer in that
formula. thanks anyway for looking.

"Gee-off" wrote:

I know how to do the sum of cells:

In cell -- c18, I have the formual "=average(c3:c17)"

My question is, if there is not value entered in one of those cells, how do
I get it to not add it in? I want C18 to omit the cells (as part of the
average) if it is blank, and only add in the average if something is entered.
(SEE EXAMPLE BELOW) I would want the average of only c6 & c7 (which in this
case is 5), since they have a number entered. I only want cell c8 to be
included if there is a number. In other words, I do not want the average to
drop if there is nothing entered.

For Example:

c6=5
c7=5
c8=(nothing entered)

Any help would be much appreciated. Thank you.



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

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