In above screenshot. Highlighted Workorder are duplicate but they have different DWR. Now my requirement is system will delete the duplicate WO but before that they put the count of DWR which are associated with that work order in Count DWR column.
dtoutput = (From d In DT.AsEnumerable
Group d By k=d("Work Order").toString.Trim Into grp = Group
Let c = grp.Count.ToString
Let ra = New Object(){grp.First()(0),grp.First()(1),k,c}
Select r = DtOutput.Rows.Add(ra)).CopyToDataTable
Hi Anil its working but my other data removed from excel. I want a complete data with DWR Count. See excel file i want all data which is in local file along with DWR count. OPEN DWRS - EV INTERNAL.xlsx (17.8 KB) OPEN DWRS - EV INTERNAL-Local.xlsx (65.6 KB)