Kareem Hafez
Kareem Hafez

Reputation: 13

Assign Values in Excel

I have excel 2016. I want to assign ID number that increments only when there is a gap on sequential values from next column as the image below

enter image description here

Upvotes: 0

Views: 29

Answers (1)

steenbergh
steenbergh

Reputation: 1771

Assuming the rows run from 1 to 10 and columns from A to C:

C1

1

C2 onwards

=IF(B2=B1+1, C1, C1+1)

Upvotes: 2

Related Questions