Sumproduct using text and values

Status
Not open for further replies.

BuzzG

Board Regular
Joined
Sep 8, 2002
Messages
67
Is there a way to sum a list that contains both text and values using the SUMPRODUCT function? My efforts yielded the #VALUE! error. SUM and SUMIF will ignore the text but I have multiple criteria. Any ideas or threads to follow?
BuzzG
 
BuzzG said:
Is there a way to sum a list that contains both text and values using the SUMPRODUCT function? My efforts yielded the #VALUE! error. SUM and SUMIF will ignore the text but I have multiple criteria. Any ideas or threads to follow?
BuzzG

Depends on your data & what you want to compute. Maybe you can post a small sample along with the desired computation.
 
Upvote 0
Sample Formula:

=SUMPRODUCT((C4:C8="RENEW")*(D4:D8="John")*(J4:J8))
Where J4:J8 contains both text and values.
 
Upvote 0
No, but this does:

=SUMPRODUCT((C4:C8="RENEW")*(D4:D8="John"),(J4:J8))

Changing the last multiply to a comma seemed to do the trick.

Thanks for your help.
BuzzG
 
Upvote 0
BuzzG said:
Sample Formula:

=SUMPRODUCT((C4:C8="RENEW")*(D4:D8="John")*(J4:J8))
Where J4:J8 contains both text and values.

Quite a coincidence. I just posted something at worksheet.functions explaining why it's better to use, whenever possible, the comma syntax of SumProduct. So, try...

=SUMPRODUCT(--(C4:C8="RENEW"),--(D4:D8="John"),(J4:J8))

or, equivalently...

=SUMPRODUCT((C4:C8="RENEW")+0,(D4:D8="John")+0,(J4:J8))

The explanation is that just like SUM, the Sum bit of SUMPRODUCT ignores text values in the range to sum if we adhere to its native, comma syntax.
 
Upvote 0
:oops: I ****-umed* it was a text-formatted numeric problem in the lqst range. Good evening, Aladin -- no more *, correct?
 
Upvote 0
Status
Not open for further replies.

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top