Sumproduct with numbers for criteria

JOHANNA

New Member
Joined
May 12, 2005
Messages
39
=SUMPRODUCT(--(GURNEE!E124:E136="RETIRED"),--(GURNEE!F124:F136="-1"))

This formula won't calculate the # of retired people with the numerical -1. I changed my GURNEE sheet to show Neg One instead of the numeric, and changed the formula and it worked. Is there a way to keep the -1?
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
I created a WorkSheet named GURNEE and input some data in E124:F136 to match your criteria.
The following formula works for me:
=SUMPRODUCT(--(GURNEE!E124:E136="RETIRED"),--(GURNEE!F124:F136=-1))
 
Upvote 0
Another thought:
Are the numbers in F124:F136 numbers or text?
If you put the following formula in G124 and copy down, are they all TRUE?
=ISNUMBER(F124)
 
Upvote 0
Okay,
When I changed the column to specify "numbers" and took the quotations off of the -1 in my formula, it works.

Thanks! I didn't realize that was a problem.
 
Upvote 0

Forum statistics

Threads
1,215,051
Messages
6,122,872
Members
449,097
Latest member
dbomb1414

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