ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   blank cells are treated as zeros how do I stop that (https://www.excelbanter.com/excel-worksheet-functions/141219-blank-cells-treated-zeros-how-do-i-stop.html)

Jez

blank cells are treated as zeros how do I stop that
 
When performing calculations blank cells are assumed to be zero values how do
I stop that i.e. blank cells should not be used in the calculation at all?

Gary''s Student

blank cells are treated as zeros how do I stop that
 
post an example
--
Gary''s Student - gsnu200718

Jez

blank cells are treated as zeros how do I stop that
 
E.g Row 1 contains results for samples taken in the morning Row 2 results for
samples taken in the afternoon. I want Row 3 to be the average of the 2
samples so set up for a3 = (a1/a2) and copy the formula across the row,
however some samples are missing therefore say e.g. column z has no afternoon
sample (z2 is blank) and the morning sample gives a value of 1 (z1=1), z3 =
0.5 when is should be 1.

"Gary''s Student" wrote:

post an example
--
Gary''s Student - gsnu200718


Gary''s Student

blank cells are treated as zeros how do I stop that
 
instead of

=(A1+A2)/2

use:

=AVERAGE(A1:A2)

AVERAGE will ignore blanks
--
Gary''s Student - gsnu200718


"Jez" wrote:

E.g Row 1 contains results for samples taken in the morning Row 2 results for
samples taken in the afternoon. I want Row 3 to be the average of the 2
samples so set up for a3 = (a1/a2) and copy the formula across the row,
however some samples are missing therefore say e.g. column z has no afternoon
sample (z2 is blank) and the morning sample gives a value of 1 (z1=1), z3 =
0.5 when is should be 1.

"Gary''s Student" wrote:

post an example
--
Gary''s Student - gsnu200718


Jez

blank cells are treated as zeros how do I stop that
 
Great, Thanks

"Gary''s Student" wrote:

instead of

=(A1+A2)/2

use:

=AVERAGE(A1:A2)

AVERAGE will ignore blanks
--
Gary''s Student - gsnu200718


"Jez" wrote:

E.g Row 1 contains results for samples taken in the morning Row 2 results for
samples taken in the afternoon. I want Row 3 to be the average of the 2
samples so set up for a3 = (a1/a2) and copy the formula across the row,
however some samples are missing therefore say e.g. column z has no afternoon
sample (z2 is blank) and the morning sample gives a value of 1 (z1=1), z3 =
0.5 when is should be 1.

"Gary''s Student" wrote:

post an example
--
Gary''s Student - gsnu200718



All times are GMT +1. The time now is 12:49 PM.

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