I have a table with user IDs and dates. It is sorted by user IDs first, then by dates.
Some dates are not unique, so I have to number the duplicates consecutively.
There are variable ranges for each user ID and i fiddled about a long time to get this code running:
But it just count the duplicates and do not number them.For j = 2 To last x = x + Worksheets("Vorlage").Range("W" & j).Value For i = y To x + 1 Range("U" & i).FormulaR1C1 = "=COUNTIF(R" & y & "C3:R" & x + 1 & "C3,R" & i & "C3)" Next i y = x + 2 Next j
The Address Property with RC notation is not my favorite, but Range("A1") or Range.Cells didn't work for me with countif.
Background: The data is from a fingerprint scanner and we have to calculate the working time.
The final table has 6 columns per day for logins and logouts (=12), because it is possible to make up to 5 breaks. It would be easy to copy the data to the correct column if i had these numbers.
I would be grateful for any idea
Best regards
Susanne