ARRAYFORMULA in GOOGLE SHEETS - Stack Overflow

I am trying to count sequentially depends on the value using ArrayFormula to avoid manually dragging th

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
Add a comment  | 

1 Answer 1

Reset to default 1

Use 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:_,_)))) 

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745588476a4634688.html

相关推荐

  • ARRAYFORMULA in GOOGLE SHEETS - Stack Overflow

    I am trying to count sequentially depends on the value using ArrayFormula to avoid manually dragging th

    23小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信