如何基于2列计数?

时间:2022-08-04 09:27:02

Column A is age, 22,23,24,25,etc.
Column B is Heart Rate, 65,66,67,68

A栏年龄为22,23,24,25等。 B列是心率,65,66,67,68

Now I want filter:
How many records are there when A=22 & (B>=65 & B<=68)?

现在我想要过滤器:A = 22&(B> = 65&B <= 68)时有多少条记录?

How to do it,please? @_@

请问怎么做? @ _ @

3 个解决方案

#1


2  

You can simply do:

你可以简单地做:

=countifs(A7:A10, "=22",B7:B10,">=65",B7:B10,"<=68")

#2


1  

For the result line by line please try:

对于逐行结果,请尝试:

=COUNTIFS(A:A,A1,B:B,B1)   

in Row 1 and copied down to suit.

在第1行并复制到适合。

For an alternative presentation you might try a PivotTable, with A/B in ROWS/COLUMNS or COLUMNS/ROWS and then either under VALUES as 'Count of'.

对于替代演示文稿,您可以尝试使用数据透视表,其中A / B在ROWS / COLUMNS或COLUMNS / ROWS中,然后在VALUES下作为“Count of”。

Either of the above can then be filtered by your choice of criteria. If you are really only interested in Age 22 this may not suit as much as a formula that 'focuses' on that age, but it can be a quick way to understand the data set better - eg how the numbers in different bands vary with age.

然后可以根据您选择的标准过滤上述任何一种情况。如果你真的只对22岁时感兴趣,这可能不适合那个“关注”那个年龄的公式,但它可以更快地理解数据集 - 例如不同频段的数字如何随年龄而变化。

如何基于2列计数?

Calculating the result line by line may facilitate charting.

逐行计算结果可以便于绘图。

#3


0  

And if you want it line by line try:

如果你想逐行尝试:

=AND(A1=22,B1>=65,B1<=68)

and you can put that inside an if statement like this:

你可以把它放在这样的if语句中:

=IF(AND(A1=22,B1>=65,B1<=68),<value if true>,<value if false>)

#1


2  

You can simply do:

你可以简单地做:

=countifs(A7:A10, "=22",B7:B10,">=65",B7:B10,"<=68")

#2


1  

For the result line by line please try:

对于逐行结果,请尝试:

=COUNTIFS(A:A,A1,B:B,B1)   

in Row 1 and copied down to suit.

在第1行并复制到适合。

For an alternative presentation you might try a PivotTable, with A/B in ROWS/COLUMNS or COLUMNS/ROWS and then either under VALUES as 'Count of'.

对于替代演示文稿,您可以尝试使用数据透视表,其中A / B在ROWS / COLUMNS或COLUMNS / ROWS中,然后在VALUES下作为“Count of”。

Either of the above can then be filtered by your choice of criteria. If you are really only interested in Age 22 this may not suit as much as a formula that 'focuses' on that age, but it can be a quick way to understand the data set better - eg how the numbers in different bands vary with age.

然后可以根据您选择的标准过滤上述任何一种情况。如果你真的只对22岁时感兴趣,这可能不适合那个“关注”那个年龄的公式,但它可以更快地理解数据集 - 例如不同频段的数字如何随年龄而变化。

如何基于2列计数?

Calculating the result line by line may facilitate charting.

逐行计算结果可以便于绘图。

#3


0  

And if you want it line by line try:

如果你想逐行尝试:

=AND(A1=22,B1>=65,B1<=68)

and you can put that inside an if statement like this:

你可以把它放在这样的if语句中:

=IF(AND(A1=22,B1>=65,B1<=68),<value if true>,<value if false>)