IF + AVERAGE combined

C

Connie

This is my formula, which is wrong, but will give you an
idea of what I'm trying to do:
=IF(M20:M300="","",AVERAGE(M20:M300))

If there's nothing in the range, I want nothing in my
cell, otherwise, I want the average of that range.

What's wrong with my formula. I wish Excel had more user-
friendly built-in wizards to help!

Thank yuou
Connie
 
E

Earl Kiosterud

Connie,

To pursue your approach, try:
=IF(OR(A2:A10<>""),AVERAGE(A2:A10),"no data")

This is an array formula -- Use Ctrl-Shift-Enter any time you've entered or
edited it. It will fail with an error in certain situations, such as when
there's one alphabetic cell by itself.

Or use:

=IF(NOT(ISERROR(AVERAGE(A2:A10))),AVERAGE(A2:A10),"no data")
 
C

Connie

What can I say, but THANK YOU!! I print all these
answers, you know, to refer to them again, when needed.

I have another question, but will post it now.

Connie
 
G

Guest

......I wish Excel had more user-
......friendly built-in wizards to help!

A response to your comment above in your original post.
Why should Excel/MS bother.....the "Wizards" are all on
here.............:)
 
Top