Remove Duplicates

Hi
image

if name and bdate are same i want older data

Not a perfect solution, but if BDate is string this works.I concatenated columns to find duplicates.

dtDuplicates.AsEnumerable().GroupBy(Function(x) x.Field(Of String)(“Name”)+x.Field(Of String)(“BDate”)).Select(Function(y) y.First()).CopyToDataTable()

4 Likes

Hi,

I want to store the duplicated rows in different excel sheet.How could i do that?