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

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
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,523
Messages
6,125,318
Members
449,218
Latest member
Excel Master

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