Hi, I have a data table that’s already in the format as per the first column below.
I would now like to count the number of recurrences and append this count to the back of the string (refer to second column above for expected outcome).
How should I go about this?
Thanks for the code! It’s working when I run your code, when I try to adapt it to my current working, it is counting the number of lines but not counting the duplicates correctly (ie it’s doing ABC_100_1, ABC_100_2, ADB_1020_3 when it shold be ADB_1020_1).
Could you briefly run through what the following code does so I can better adapt it please?
AsEnumerable.Select(Function (r, index) new Tuple(Of Int32, String)(index, r(0).toString)).Where(Function (t) t.Item1 <=idx And t.Item2.Equals(row(0).toString)).Count