Home » excel » excel – Average including blank cells

excel – Average including blank cells

Posted by: admin April 23, 2020 Leave a comment

Questions:

I would like to average a range but some of the cells are blanks.
The cells should remain blanks, is there a way of including them in an AVERAGE?

For example, if I have 2 cells, one is empty and the other is 100, I want the average to be 50

How can I do this?

How to&Answers:

If your values are in A1:A2 (for example), try this:

=SUMPRODUCT(AVERAGE(0+A1:A2))

it forces your blank values to be converted to 0 before taking the average

Answer:

If you have a column that is never blank (like name of a person) then:

=SUM(B1:B100)/COUNT(A1:A100)

Where B is the column to average and A is the name column (never blank). Careful as some people tend to leave A1 and B1 as descriptions of the column and if that is the case with you then use A2:A100 and B2:B100 otherwise row 1 will be counted to the average.