Frequency with criteria

degree01

New Member
Joined
Jul 24, 2012
Messages
32
I have used the "Frequency" to count marks within the given range i.e 0-23, 24-29, 30-53

Column A contains the following student marks assuming first mark is in A1

22
21
23
29
50

Column B has Bin value, 23 is in B1. Bin value sets the maximum marks in a range.

23
29
53

column C contains the below formulas, first formula in C1, second in C2 etc

{=FREQUENCY(A:A,B1:B3)}
{=FREQUENCY(A:A,B1:B3)}
{=FREQUENCY(A:A,B1:B3)}

this give me result as below, first number in C1, second in C2 etc

3 (3 students received marks from from 0 to 23)
1 (1 students received marks from from 24 to 29)
1 (1 students received marks from from 30 to 53)

Column D contains gender, male or female.

Now what I need is to find out how many of the students from the range 0 to 23, 24 to 29 and 30 to 52 are male or female using column D. For example 0 to 23 range has 3 students, two of them are male and one female.

Column E should show Male, and F should show Female.

Hope that makes sense, I will really appreciate if anyone can help. Thank you.
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Maybe something like



A

B

C

D

E

F

1

Values​

Bin​

Freq​

Gender​

Freq M​

Freq F​

2

22​

23​

3​

M​

2​

1​

3

21​

29​

1​

M​

1​

0​

4

23​

53​

1​

F​

0​

1​

5

29​

M​

6

50​

F​

<TBODY>
</TBODY>


Array formula in C2:C4
=FREQUENCY(A2:A6,B2:B4)

Array formula in E2:E4
=FREQUENCY(IF(D2:D6="M",A2:A6),B2:B4)

Array formula in F2:F4
=FREQUENCY(IF(D2:D6="F",A2:A6),B2:B4)

All formulas must be confirmed with Ctrl+Shift+Enter

M.
 
Upvote 0
Hi Marcelo I am alway from my laptop at the moment, using tablet, but this is exactly what i want, i will try the formulas out tmr and see if it works for me. Thanks alot.
 
Upvote 0
Hi Marcelo I am alway from my laptop at the moment, using tablet, but this is exactly what i want, i will try the formulas out tmr and see if it works for me. Thanks alot.

You are welcome! Thanks for the feedback.

M.
 
Upvote 0

Forum statistics

Threads
1,216,084
Messages
6,128,730
Members
449,465
Latest member
TAKLAM

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