I wanted to create a new column, let say named "group id" on the basis of:
- compare the nth row with (n-1)th row.
- if both the records are equal then in a "group id", previous "group id" is copied
- If these records are not equal, then 1 should be added to "group id column".
I wanted to have the result in the following way:
Column A | Column B |
---|---|
6-Aug-10 | 0 |
30-Aug-11 | 1 |
31-Aug-11 | 2 |
31-Aug-11 | 2 |
6-Sep-12 | 3 |
30-Aug-13 | 4 |
Looking for the result, similar to this excel function =IF(T3=T2, U2, U2+1)