SUMPRODUCT when 3 conditions (2 text + 1 number) are fullfilled

miss_anonymous

New Member
Joined
May 25, 2011
Messages
4
Hello everyone,

this forum was highly recommanded to me.
I want to evaluate an questionnaire with Excel 2003
This is the problem i need to solved:

I need a Makro which counts all green eyed females at the age of 1.

This data is spread within 3 collumns:

Count in Column E (Text: "green", "blue", "brown") only when both additional conditions are fulfilled in the same row:
condition 1 => Column F = female (Text: female, male) and
condition 2 => Column G = 1 (Number: 1-99)

I have tried a few different formula but it is not right, yet:

=SUMPRODUCT((E1:E11="green")=IF(G1:G11=1)*(F1:F11="female")

unfortunately the countif.function does not exist for Excel.2003.

Hope you can help me!

Thank you very much,

miss anonymous
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Hi, welcome to the board.

COUNTIF does exist in 2003, but not COUNTIFS, which I think exists in later versions.

Try
Code:
=sumproduct(--(e1:e11="green"),--(g1:g11=1),--(f1:f11="female"))
 
Upvote 0
Hello everyone,

this forum was highly recommanded to me.
I want to evaluate an questionnaire with Excel 2003
This is the problem i need to solved:

I need a Makro which counts all green eyed females at the age of 1.

This data is spread within 3 collumns:

Count in Column E (Text: "green", "blue", "brown") only when both additional conditions are fulfilled in the same row:
condition 1 => Column F = female (Text: female, male) and
condition 2 => Column G = 1 (Number: 1-99)

I have tried a few different formula but it is not right, yet:

=SUMPRODUCT((E1:E11="green")=IF(G1:G11=1)*(F1:F11="female")

unfortunately the countif.function does not exist for Excel.2003.

Hope you can help me!

Thank you very much,

miss anonymous
Use cells to hold the criteria:
  • A1 = Green
  • B1 = Female
  • C1 = 1
Then:

=SUMPRODUCT(--(E1:E11=A1),--(F1:F11=B1),--(G1:G11=C1))
 
Upvote 0
Thank you very much for your instant help (:

You've been most helpful, guys!

I prefer the first solution, because I do not want to change the text in coding.


Another question - refering to the same example:

I need all "green" AND "blue" coloured females at the age of 1.

Is my solution right?

=sumproduct(--(e1:e11="green" and "blue"),--(g1:g11=1),--(f1:f11="female"))


Thank you for your help!

Cheers,

miss anonymous
 
Last edited:
Upvote 0
Thank you very much for your instant help (:

Unfortunately I do not want to change the text in coding.


Is it also possible to stick to the text for the 2. conditions (green and female), when remaining the number for the 3. condition ?

Thank you for your help!

Cheers,

miss anonymous

In that case...

=SUMPRODUCT(--(E1:E11="green"),--(G1:G11=1),--(F1:F11="female"))
 
Upvote 0
Thank you very much for your instant help (:

You've been most helpful, guys!

I prefer the first solution, because I do not want to change the text in coding.


Another question - refering to the same example:

I need all "green" AND "blue" coloured females at the age of 1.

Is my solution right?

=sumproduct(--(e1:e11="green" and "blue"),--(g1:g11=1),--(f1:f11="female"))


Thank you for your help!

Cheers,

miss anonymous

Try...

=SUMPRODUCT(--ISNUMBER(MATCH(E1:E11,{"green","blue"},0)),--(G1:G11=1),--(F1:F11="female"))
 
Upvote 0
Thank you very much for your instant help (:

You've been most helpful, guys!

I prefer the first solution, because I do not want to change the text in coding.
OK, then use:

=SUMPRODUCT(--(E1:E11="green"),--(F1:F11="female"),--(G1:G11=1))

Another question - refering to the same example:

I need all "green" AND "blue" coloured females at the age of 1.

Is my solution right?

=sumproduct(--(e1:e11="green" and "blue"),--(g1:g11=1),--(f1:f11="female"))


Thank you for your help!

Cheers,

miss anonymous
Try it like this...

=SUMPRODUCT(--ISNUMBER(MATCH(E1:E11,{"green","blue"},0)),--(F1:F11="female"),--(G1:G11=1))
 
Upvote 0

Forum statistics

Threads
1,224,567
Messages
6,179,571
Members
452,927
Latest member
whitfieldcraig

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