Sumproduct mystery

ceej75

New Member
Joined
Jun 14, 2010
Messages
8
Hello all, I'm a bit stumped, hopefully someone can help me out.

On a prior project I used
=SUMPRODUCT((O253:O543="x")*(R253:X543="x")) to return the number of minority males O253:o543 had an "x" if the person was male and R253:x543 had an "x" in one of the column if the person was a minority. R was Black, S was Hispanic, T was asian and so on.
It worked just fine.

Today on a similar project I assigned numbers to the race so that I didn't have so many columns to deal with, so now instead of having columns r-s representing minority groups, I only have one column and the numbers 1-7, each one assigned to a different group.

=SUMPRODUCT((N3:N18="Male")*(O3:O18="1"))
Its not working... it keeps coming back with zero.
N column will always have either male female or unknown in it
O column will always have 0-7 in it. The 0 represents then unknown.

Thanks in advance for any thoughts.

Ceej.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Maybe
=SUMPRODUCT((N3:N18="Male")*(O3:O18=1))

if this doesnt work check for trailing spaces in column N
or if this is web related for the existence of CHAR(160) (HTML space) in column N
 
Upvote 0
=SUMPRODUCT((N3:N18="Male")*(O3:O18="1"))

I believe it is because you are comparing the value of one as a text value vs. numeric values in your range. Try typing the number 1 into an empty cell and refer to it in your formula...
 
Upvote 0
=SUMPRODUCT((N3:N18="Male")*(O3:O18="1"))

I believe it is because you are comparing the value of one as a text value vs. numeric values in your range. Try typing the number 1 into an empty cell and refer to it in your formula...

Thanks....
Can you flesh that out a bit? I'm not sure I understand your fix. I do understand what you think the problem may be though.
 
Upvote 0
Make sure you have data in there that looks like "Male" and 1

Take out one of the SUMPRODUCT formula parts so you can isolate which bit is failing, ie

does
=SUMPRODUCT((N3:N18="Male")) produce a non zero value?
does
=SUMPRODUCT((O3:O18=1)) produce a non zero value?
 
Upvote 0
ok.. i've tried all suggestions and combinations of.
I feel like its just some random little glitch that I'm missing. I have the male/female/unknown formated as text and the numbers formated as numbers. They were set up as just general on both accounts.

Any more ideas?

Thanks all.
 
Upvote 0
So you tried this version?

=SUMPRODUCT((N3:N18="Male")*(O3:O18=1))

does that give you zero?

What about this?

=SUMPRODUCT((O3:O18=1)*1)
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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