SOLVED

Changing year to a running number

Copper Contributor

Hello!

 

I have a data set like the one in the screenshot on the left side and want to convert it to the version on the right side. With the following logic: The first appearance of a person/year combination would be set to 1, the second 2 and so on. The first year however is not always the same for every person and

the person year combination can occur multiple times. 

 

If anyone has any suggestions on how to deal with this problem I would appreciate it.

 

2022-08-21 02_32_00-Mappe2 - Excel.png

1 Reply
best response confirmed by Starasta (Copper Contributor)
Solution

@Starasta Give a try on below formula-

=SUM(--(UNIQUE(FILTER($B$2:$B2,$A$2:$A2=D2))<>""))

Harun24HR_0-1661050613046.png

 

 

1 best response

Accepted Solutions
best response confirmed by Starasta (Copper Contributor)
Solution

@Starasta Give a try on below formula-

=SUM(--(UNIQUE(FILTER($B$2:$B2,$A$2:$A2=D2))<>""))

Harun24HR_0-1661050613046.png

 

 

View solution in original post