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

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
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,657
Messages
6,120,773
Members
448,991
Latest member
Hanakoro

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