IF and ISBlank for a selected range of cells

N

NavyMom

Using Excel 207 and want to search in a particular range (A1:A31) to
determine if all cells are blanks, [true] would return a blank, [false] would
sum the range (A1:A31) then divide by number of hits within that range.

A
1 25
2
3 100
4 75
... 25
30 49
31 89

How would I write the formula? Unable to define range names because of the
size of data and updates to date. I tired this, but it doesn't work.

=+IF(ISBLANK(A1:A31),"",SUM(A1:A31)/31)
Thanks
 
J

Jim Thomlinson

You can give this a try... I think it is what you want...

=IF(COUNT(A1:A31)=0,0,AVERAGE(A1:A31))
 
D

Dave Peterson

You could use =count() to see how many numbers are in the cell.

Then use =average() instead of sum/count.

=if(count(a1:a31)=0,"No numbers",average(a1:a31))

Or if you really wanted:

=if(count(a1:a31)=0,"No numbers",sum(a1:a31)/count(a1:a31))


Using Excel 207 and want to search in a particular range (A1:A31) to
determine if all cells are blanks, [true] would return a blank, [false] would
sum the range (A1:A31) then divide by number of hits within that range.

A
1 25
2
3 100
4 75
.. 25
30 49
31 89

How would I write the formula? Unable to define range names because of the
size of data and updates to date. I tired this, but it doesn't work.

=+IF(ISBLANK(A1:A31),"",SUM(A1:A31)/31)
Thanks
 
N

NavyMom

Thanks,
This helps a lot.
NavyMom

Dave Peterson said:
You could use =count() to see how many numbers are in the cell.

Then use =average() instead of sum/count.

=if(count(a1:a31)=0,"No numbers",average(a1:a31))

Or if you really wanted:

=if(count(a1:a31)=0,"No numbers",sum(a1:a31)/count(a1:a31))


Using Excel 207 and want to search in a particular range (A1:A31) to
determine if all cells are blanks, [true] would return a blank, [false] would
sum the range (A1:A31) then divide by number of hits within that range.

A
1 25
2
3 100
4 75
.. 25
30 49
31 89

How would I write the formula? Unable to define range names because of the
size of data and updates to date. I tired this, but it doesn't work.

=+IF(ISBLANK(A1:A31),"",SUM(A1:A31)/31)
Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top