Array Formulas

Ben S

Board Regular
Joined
Oct 21, 2002
Messages
124
I have been trying to use array formulas without any success. I haven't got the add in feature of conditional sum wizard and would like to know where i am going wrong.

I have got a number of columns and would like to count the no of eligible males. Column M3: M250 (eligibility) either is YES or No and Column AF3 :M250 (Gender) either is MALE or Female

I have written the formula
=Sum(($M$3:$M$250="YES")*($AF$3:$AF$250=MALE)

I should point out that i have add the braces{}using control, alt delete
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Here is a normal (non array) formula:

=SUMPRODUCT(($M$3:$M$250="YES")*($AF$3:$AF$250="MALE"))

and an array formula:

=SUM(IF($M$3:$M$250="YES",IF($AF$3:$AF$250="MALE",1,0),0))

Use Ctrl+Shift+Enter not Ctrl+Alt+Delete!
 
Upvote 0
Hi,

You can use SUMPRODUCT to do this:-

=SUMPRODUCT((M3:M250="YES")*(AF3:AF250="MALE"))
 
Upvote 0
On 2002-11-04 06:49, Ben S wrote:
I have been trying to use array formulas without any success. I haven't got the add in feature of conditional sum wizard and would like to know where i am going wrong.

I have got a number of columns and would like to count the no of eligible males. Column M3: M250 (eligibility) either is YES or No and Column AF3 :M250 (Gender) either is MALE or Female

I have written the formula
=Sum(($M$3:$M$250="YES")*($AF$3:$AF$250=MALE)

I should point out that i have add the braces{}using control, alt delete

Hi Ben,

You can do this without an array formula as follows:

=SUMPRODUCT(($M$3:$M$250="YES")*($AF$3:$AF$250="MALE"))

If you wanted to get an array formula this would work:

= SUM(IF($M$3:$M$250="YES",IF($AF$3:$AF$250="MALE",1,0),0))

The SUMPRODUCT would be my preferred route as you don't need the Ctrl + Shift + Enter and the problems for other people understanding etc...
 
Upvote 0

Forum statistics

Threads
1,214,643
Messages
6,120,707
Members
448,981
Latest member
recon11bucks

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