I have a sumproduct formula that is returning #Value! when the range includes
cells with a "-" instead of a zero. How can I get around this so that it
treats the "-" like zeros? My formula:
=SUMPRODUCT((Data!A70:A78=Sheet1!B72)*(Data!H70:H78))
Thanks in advance
Peo Sjoblom - 05 May 2008 15:53 GMT
Use a custom format, for instance
0.00;-0.00;"-"
will display zero as -
or if these are money use accounting format

Signature
Regards,
Peo Sjoblom
>I have a sumproduct formula that is returning #Value! when the range
>includes
[quoted text clipped - 4 lines]
>
> Thanks in advance
deeds - 05 May 2008 16:03 GMT
Thanks...I just noticed these are formated as text....I tried your custom
format below...didn't work. Is there any way I can convert these to numbers
and make them zeros? Thanks again
> Use a custom format, for instance
>
[quoted text clipped - 12 lines]
> >
> > Thanks in advance
Peo Sjoblom - 05 May 2008 16:08 GMT
If they are text format and not general with text in them, do an
edit>replace and replace - with 0
after you have change the format to the custom one

Signature
Regards,
Peo Sjoblom
> Thanks...I just noticed these are formated as text....I tried your custom
> format below...didn't work. Is there any way I can convert these to
[quoted text clipped - 18 lines]
>> >
>> > Thanks in advance
deeds - 05 May 2008 16:34 GMT
That would work.....thanks for your help!
> If they are text format and not general with text in them, do an
> edit>replace and replace - with 0
[quoted text clipped - 22 lines]
> >> >
> >> > Thanks in advance
PCLIVE - 05 May 2008 15:55 GMT
Not sure I completely understand you, but maybe something like this:
=SUMPRODUCT(--(Data!A70:A78=Sheet1!B72)+(Data!A70:A78="-"),(Data!H70:H78))
HTH,
Paul
>I have a sumproduct formula that is returning #Value! when the range
>includes
[quoted text clipped - 4 lines]
>
> Thanks in advance
deeds - 05 May 2008 16:34 GMT
Excellent! This works perfect. Thanks much!
> Not sure I completely understand you, but maybe something like this:
>
[quoted text clipped - 11 lines]
> >
> > Thanks in advance
Dave Peterson - 05 May 2008 16:26 GMT
=SUMPRODUCT(--(Data!A70:A78=Sheet1!B72),Data!H70:H78)
With this syntax, text will be ignored/treated as 0.
> I have a sumproduct formula that is returning #Value! when the range includes
> cells with a "-" instead of a zero. How can I get around this so that it
[quoted text clipped - 3 lines]
>
> Thanks in advance

Signature
Dave Peterson
deeds - 05 May 2008 17:01 GMT
Even better....thanks for the solution!
> =SUMPRODUCT(--(Data!A70:A78=Sheet1!B72),Data!H70:H78)
>
[quoted text clipped - 7 lines]
> >
> > Thanks in advance