How do I increment the row count (Cnt) based on the Number column in Excel? Are there any formulas that I can use to generate the Cnt column?
Cnt Number
1 IF1234
1 IF1234
2 IF4444
2 IF4444
3 IF5555
3 IF5555
How do I increment the row count (Cnt) based on the Number column in Excel? Are there any formulas that I can use to generate the Cnt column?
Cnt Number
1 IF1234
1 IF1234
2 IF4444
2 IF4444
3 IF5555
3 IF5555
If the values in the Number column are sorted (i.e., grouped), you can do the following.
=IF(B3=B2,A2,A2+1) in A3, where column B holds the Number values.If, however, the values in the Number column are NOT sorted, you will need to do the following:
=IF(ISERROR(MATCH(B3,B$2:B2,0)),MAX(A$2:A2)+1,INDEX(A$2:A2,MATCH(B3,B$2:B2,0))) in A3.