Hoping someone has an idea on how to tackle this: My goal is to find only duplicate values in one column of a DT and return their respective values assigned to them.
I hope if anything the screenshot below can better explain.
Here you go
hope this expression would help you resolve this datatable = datatable.AsEnumerable().GroupBy(Function(a) a.Field(of string)(“yourcolumnnname”).ToString).Select(Function(b) b.First()).CopyToDatatable()
With my data set, it’s ok for me to use .First or .Last since I will only have 1 duplicate at a time and I need perform calculations on these variables separately anyways. So I do two functions, 1st as described above, and 2nd one as below:
ok, no problem, it is just that when marked as solution other people would assume that code will solve their problem, when in truth it wont, although is a good start