admin管理员组文章数量:1431943
I am trying to count sequentially depends on the value using ArrayFormula to avoid manually dragging the column, I want to autofill everytime I add a value in Column A
in Column B - the ArrayFormula does not work
=ARRAYFORMULA(IF(I$1:I<>"", COUNTIF(I$1:I1, I1:I), ""))
in Column C - I tried to do it using
=COUNTIF(I$1:I1, I1:I)
A | B | C |
---|---|---|
A1 | 1 | 1 |
A1 | 1 | 2 |
A1 | 1 | 3 |
B1 | 0 | 1 |
B1 | 0 | 2 |
A2 | 0 | 1 |
A2 | 0 | 2 |
I am trying to count sequentially depends on the value using ArrayFormula to avoid manually dragging the column, I want to autofill everytime I add a value in Column A
in Column B - the ArrayFormula does not work
=ARRAYFORMULA(IF(I$1:I<>"", COUNTIF(I$1:I1, I1:I), ""))
in Column C - I tried to do it using
=COUNTIF(I$1:I1, I1:I)
A | B | C |
---|---|---|
A1 | 1 | 1 |
A1 | 1 | 2 |
A1 | 1 | 3 |
B1 | 0 | 1 |
B1 | 0 | 2 |
A2 | 0 | 1 |
A2 | 0 | 2 |
I tried to replicate the result in Column C using ArrayFormula but i couldn't do it.
Thank you.
Share Improve this question asked Nov 19, 2024 at 0:10 mj mjmj mj 174 bronze badges 1- Use a descriptive title please. See How to Ask – TheMaster Commented Nov 19, 2024 at 6:04
1 Answer
Reset to default 1Use the following formula in row 1 of an empty column:
=ARRAYFORMULA(IF(I:I="",,COUNTIFS(I:I,I:I,ROW(I:I),"<="&ROW(I:I))))
You could also do it using MAP
:
=MAP(I:I,LAMBDA(_,IF(_="",,COUNTIF(I1:_,_))))
本文标签: ARRAYFORMULA in GOOGLE SHEETSStack Overflow
版权声明:本文标题:ARRAYFORMULA in GOOGLE SHEETS - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745588475a2665054.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论