SUMIF function?

E

ej764

How would I use the sumif function to calculate only numeric values in a row
that may contain text and numeric characters?
 
B

Bob Phillips

=SUMPRODUCT(--(NOT(ISTEXT(A1:A20))),A1:A20)

be aware, dates get counted as dates are just numbers in Excel.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
R

Roger Govier

Hi

One way
=SUMPRODUCT(--(ISNUMBER(A1:Z1))) for your numerics
=SUMPRODUCT(--(ISTEXT(A1:Z1))) for your text values

or if the formula is not in the same row as you are testing, then
=SUMPRODUCT(--(ISNUMBER(1:1)))
to count all 256 cells

Regards

Roger Govier
 
Top