=sumproduct(--(isnumber(c139:c152)),d139:d152)
Adjust the ranges to match--but you can't use whole columns (except in xl2007).
=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.
Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html
Bob Arnett wrote:
I have a column of figures (D139:D152) and want to add only the numbers that
are next to a cell (C139:C152) with a numerical value (not text). So I used
the formula:
=SUMIF(C139:C152,isnumber,D139:D152)
Since I'm not familiar with SUMIF syntax, I've also tried other variaitions
like:
=SUMIF(C139:C152,isnumber(),D139:D152)
=SUMIF(C139:C152,"isnumber",D139:D152)
=SUMIF(C139:C152,"=isnumber",D139:D152)
=SUMIF(C139:C152,"=isnumber()",D139:D152)
=SUMIF(C139:C152,"isnumber()",D139:D152)
None of these work so what is the proper way of writing this formula?
--
Dave Peterson