How to delete dublicate values in excel. based on 2 different columns dats

we can use a group by for detecting the duplicates

VB:

dtResult =

(From d in dtData.AsEnumerable
Group d by k1=d("Case Number").toString.Trim, k2=d("Receipt Number").toString.Trim into grp = Group
Where grp.Count = 1
From g in grp
Select r = g).CopyToDataTable()

Also have a look here where also a Non-LINQ approach is described:

1 Like