[英]how to count number between certain range of rows?
i would like to count number for every 7 rows, data are in one column. 我想计算每7行的数字,数据在一列。 i use this formula, but it is not working. 我使用这个公式,但它不起作用。
from B8
to B14329
, for every 7 rows, count number if it is equal to 3. so i know how many 3 in every 7 rows. 从B8
到B14329
,对于每7行,如果它等于3则计数。所以我知道每7行中有3个。
=COUNTIFS(B8:B14329, OFFSET($B$7,(ROW()-12)*7,0,7,1),B8:B14329,=3)
Thanks a lot! 非常感谢! i want something like this: 我想要这样的东西:
data count
3
2
3
1
3
3
1 4
1
2
2
3
3
1
1 2
.....
....
...
Simple and easy: 简单易用:
=SUMPRODUCT((B8:B14329=3)*(MOD(ROW(B8:B14329),7)=1))
Just change the =1
to your needs. 只需根据您的需要更改=1
即可。 To start with row 1 =1
, 2 =2
... 6 =6
, 7 =0
. 从第1行开始=1
1,2 =2
... 6 =6
=0
。 This way, to start count at row 8 it is =1
这样,为了在第8行开始计数,它是=1
EDIT : having your exaple now, you want something completely different... lol. 编辑 :现在有你的exaple,你想要一些完全不同的东西......哈哈。
=IF(MOD(ROW(),7)=0,COUNTIF(A8:A14,3),"")
Put this in row 14 and then drag down... change the =0
as you need it. 将其放入第14行,然后向下拖动...根据需要更改=0
。
Here's what I would do 这就是我要做的
You can use the MOD
function to check the remainder of the division. 您可以使用MOD
功能检查除法的其余部分。
= MOD ( Number , Divisor )
By now, you should have, aside from the columns you already have, something like: 到目前为止,除了已有的列之外,你应该有:
8-----FALSE
9-----FALSE
10-----FALSE
11-----FALSE
12-----FALSE
13-----FALSE
14-----TRUE
15-----FALSE
Once you have that, just apply a filter on the "TRUE/FALSE" column, select the "TRUE" values and you will be able to count the number of "3"s on the actual value column, by also using a filter on it. 完成后,只需在“TRUE / FALSE”列上应用过滤器,选择“TRUE”值,您就可以通过使用过滤器来计算实际值列中“3”的数量。它。
I hope it helps, and it's easier than a really messy formula. 我希望它有所帮助,它比一个非常混乱的公式更容易。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.