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

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
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!
 

dk

MrExcel MVP
Joined
Feb 15, 2002
Messages
2,942
Hi,

You can use SUMPRODUCT to do this:-

=SUMPRODUCT((M3:M250="YES")*(AF3:AF250="MALE"))
 

s-o-s

Active Member
Joined
Apr 14, 2002
Messages
384
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...
 

Forum statistics

Threads
1,143,708
Messages
5,720,388
Members
422,282
Latest member
psunith

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
Top