Home > database >  In Excel, how can I create a counter to increment based on a condition?
In Excel, how can I create a counter to increment based on a condition?

Time:08-28

Lets say in Excel, that I have this in a column. When the number in column N is greater than 3, then the number in the Counter column increases. I have tried if statements, but the count never works.

N  Counter
1  1
2  1
3  1
1  2
2  2
3  2
1  3
2  3
3  3

CodePudding user response:

Try this simple COUNTIFS() function.

=COUNTIFS($A$2:$A2,A2)

enter image description here

  • Related