Having problem with 'if' in what should be a simple formula

M

Meenie

I have Excel 2003
All I want to do is make a formula to show the Average of a range of cells
BUT some of the cells are have #DIV/0 (I don't have the numbers for those
right now) and I want to ignore those cells. I'm trying to do that with an
"if" formula, but can't seem to get it to come out right. I keep getting
?Name.
 
G

Gary''s Student

=AVERAGE(IF(ISNUMBER(E1:E100),E1:E100,""))

this is an array formula that must be entered with CNTRL-SHFT-ENTER rather
than just he ENTER key.
 
G

Gord Dibben

Error-check your cells' formulas to prevent the #DIV/0 to start with is the
best solution.

e.g. formulas in A1:A10

=IF(OR(D1="",D1=0),"",C1/D1)

=AVERAGE(A1:A10) will ignore the "" cells


Gord Dibben MS Excel MVP
 
M

Meenie

I tried this and got back #value!

Gary''s Student said:
=AVERAGE(IF(ISNUMBER(E1:E100),E1:E100,""))

this is an array formula that must be entered with CNTRL-SHFT-ENTER rather
than just he ENTER key.
 
J

John

Hi Meenie
It's important that you press Ctrl>Shift>Enter not just enter.
If you do it right, you will get curly bracket around your formula.
e.g.{=AVERAGE(IF(ISNUMBER(E1:E100),E1:E100,""))}
Make a small correction on your formula and press Ctrl>Shift>Enter , you should
see the curly brackets, don't type them in yourself, it won't work.
HTH
John
 

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