View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default SumProduct problem

IsNumeric is the VB function for testing if a value is a number or not...
ISNUMBER is the worksheet function equivalent of that. Also, you don't
really need some of those parentheses as what they surround are
self-contained. In addition, you do not want to use the double unary (minus
signs) in front of the cell reference (if the cell contains text, it will
produce an error... plus, that is why you are using the ISNUMBER function).
This is the formula you should have tried...

=SUMPRODUCT(--ISNUMBER($D$10:$D$500),$D$10:$D$500)

HOWEVER, you don't need to have your formula do all that work... SUM will
skip over text and only add numbers. So, you can use this formula instead
and it should do what you want...

=SUM($D$10:$D$500)

--
Rick (MVP - Excel)


"John" wrote in message
...
How do I fix the following to sum the column & not get a #NAME? error?
=SUMPRODUCT(--(IsNumeric($D$10:$D$500)), --($D$10:$D$500))

I appreciate your help, -John