Multi-demensional frequency distribution

  • Thread starter Thread starter Cortez
  • Start date Start date
C

Cortez

I'm looking for a formula that can display the number of people whose account activity matches two sets of criteria.

Countifs() and Frequency() come close, but can't quite do what I need. (Or, I can't figure out how to use them effectively.)

I have two data columns, 5 rows each, each row representing a unique person:
A1:A5 - closing bank account balances
B1:B5 - total account deposits

A
2000.00
2500.00
1500.00
500.00
3000.00

B
100.00
200.00
0.00
100.00
400.00

I want to be able to count the number of people who satisfy the following criteria:
C1: Account Balance < 2500 and Deposits < 250
C2: Account Balance >= 2500 and Deposits < 250
D1: Account Balance < 2500 and Deposits >= 250
D2: Account Balance >= 2500 and Deposits >= 250

If I use the FREQUENCY array function I can validate one criteria only. I can either determine the frequency of Account balance meeting the criteria OR Deposits, but not both.

I also tried using COUNTIFS like:

C1:=countifs(A1:A5,">=0",A1:A5,"<2500",B1:B5,">=0",B1:B5,"<250")

However, this doesn't give an accurate result for between 0 to 250 AND between 0 to 2500. I understand why this doesn't work, but I wanted to give an idea of what I am trying to accomplish.

If anyone understands what I am trying to do, your help would be greatly appreciated.

Thanks,
TK
 
Hi,



Am Thu, 24 Jan 2013 12:29:18 -0800 (PST) schrieb Cortez:










for C1 try:

=COUNTIFS(A1:A5,"<2500",B1:B5,"<250")

or

=SUMPRODUCT(--(A1:A5<2500),--(B1:B5<250))





Regards

Claus Busch

--

Win XP PRof SP2 / Vista Ultimate SP2

Office 2003 SP2 /2007 Ultimate SP2

Claus,

I should have been more clear. What I gave you was an example, and your response works for that. However, there are many more than two rows and two columns in the real problem (C1:V20) with much smaller increments than 250 / 2500, and so I can't rely on just a <250 and <2500 I have to specify "between" in some manner.

That's why I was trying to use the countifs in the manner I show in the example.
 
Hi,

Am Thu, 24 Jan 2013 13:04:32 -0800 (PST) schrieb Cortez:
I should have been more clear. What I gave you was an example, and your response works for that. However, there are many more than two rows and two columns in the real problem (C1:V20) with much smaller increments than 250 / 2500, and so I can't rely on just a <250 and <2500 I have to specify "between" in some manner.

but your formula
countifs(A1:A5,">=0",A1:A5,"<2500",B1:B5,">=0",B1:B5,"<250")
counts between 0 and 2499 and betwenn 0 and 249. You can also use cell
references for the values so you can change the formula by changing the
values. And you can extend the formula for your other columns.


Regards
Claus Busch
 
I'm looking for a formula that can display the number of people whose account activity matches two sets of criteria.



Countifs() and Frequency() come close, but can't quite do what I need. (Or, I can't figure out how to use them effectively.)



I have two data columns, 5 rows each, each row representing a unique person:

A1:A5 - closing bank account balances

B1:B5 - total account deposits



A

2000.00

2500.00

1500.00

500.00

3000.00



B

100.00

200.00

0.00

100.00

400.00



I want to be able to count the number of people who satisfy the following criteria:

C1: Account Balance < 2500 and Deposits < 250

C2: Account Balance >= 2500 and Deposits < 250

D1: Account Balance < 2500 and Deposits >= 250

D2: Account Balance >= 2500 and Deposits >= 250



If I use the FREQUENCY array function I can validate one criteria only. I can either determine the frequency of Account balance meeting the criteria OR Deposits, but not both.



I also tried using COUNTIFS like:



C1:=countifs(A1:A5,">=0",A1:A5,"<2500",B1:B5,">=0",B1:B5,"<250")



However, this doesn't give an accurate result for between 0 to 250 AND between 0 to 2500. I understand why this doesn't work, but I wanted to give an idea of what I am trying to accomplish.



If anyone understands what I am trying to do, your help would be greatly appreciated.



Thanks,

TK

I've resolved my issue. Thanks for your assistance.
 
Hi,



Am Thu, 24 Jan 2013 13:04:32 -0800 (PST) schrieb Cortez:






but your formula

countifs(A1:A5,">=0",A1:A5,"<2500",B1:B5,">=0",B1:B5,"<250")

counts between 0 and 2499 and betwenn 0 and 249. You can also use cell

references for the values so you can change the formula by changing the

values. And you can extend the formula for your other columns.





Regards

Claus Busch

--

Win XP PRof SP2 / Vista Ultimate SP2

Office 2003 SP2 /2007 Ultimate SP2

Yes, I found a different error that made me think my original countifs wasn't working. You are right, it did what I needed all along.

Thanks again!

TK
 
Back
Top