有没有办法根据一列中的条件来计算一行中的项目数?

Is there way to count the number of items in a row based on a criteria in one column?

所以我想找出这个公式。我一直在尝试使用 COUNTIFCOUNTIFS 函数,但无济于事。我正在尝试计算 30 分钟内出现的次数。它应该显示 1。

=COUNTIF(D7:D17,R7,E7:N10,"")

...其中 D7:D17 是第一列中的范围,R7 是“30 分钟”。 E7:N10 是从 1-10 列的范围。我收到错误:

"Array arguments to COUNTIFS are of different size." Then I tried E10:N10 and still got the same error.)

尝试:

=ARRAYFORMULA(SUM(IF(A2:A="30 minutes", 
 MMULT(IF(B2:K<>"", 1, 0), TRANSPOSE(COLUMN(B:K))^0), )))