Count IF?

C

Canon

Excel 2007
I have a simple formula, =sum(F13:F38)
I have added formulas in other cells that when nothing is in the cells, #N/A
appears in some of the cells (F13 to F18) and my above formula will no longer
work. Is there a way to correct this formula to just add up the cells with
numbers?
 
R

Rick Rothstein

Try putting =NA() into one of the cells in the range... the formula
evaluates to #NA, probably because SUMPRODUCT attempts to multiply the #N/A
by 0 for cells containing #N/A, which it cannot do.
 
R

Rick Rothstein

Try putting =NA() into one of the cells in the range... the formula
evaluates to #NA, probably because SUMPRODUCT attempts to multiply the #N/A
by 0 for cells containing #N/A, which it cannot do.
 
C

Chip Pearson

Try the following array formula:

=SUM(IF(ISNA(F13:F38),FALSE,F13:F38))

Since this is an Array Formula, you *must* press CTRL SHIFT ENTER
rather than just ENTER when you first enter the formula
and whenever you edit it later. If you do this properly,
Excel will display the formula in the Formula Bar enclosed
in curly braces { }. (You do not type the curly braces -
Excel includes them automatically.) The formula will
not work properly if you do not use CTRL SHIFT ENTER. See
http://www.cpearson.com/excel/ArrayFormulas.aspx for lots
more information about array formulas.


Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 
C

Chip Pearson

Try the following array formula:

=SUM(IF(ISNA(F13:F38),FALSE,F13:F38))

Since this is an Array Formula, you *must* press CTRL SHIFT ENTER
rather than just ENTER when you first enter the formula
and whenever you edit it later. If you do this properly,
Excel will display the formula in the Formula Bar enclosed
in curly braces { }. (You do not type the curly braces -
Excel includes them automatically.) The formula will
not work properly if you do not use CTRL SHIFT ENTER. See
http://www.cpearson.com/excel/ArrayFormulas.aspx for lots
more information about array formulas.


Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 

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