Group And Sum

1st file 2nd File
inp1 is input I want inp2…

You can use below linq query,
(From p In DT1.AsEnumerable() Group By nm=p(“name”) Into grp=Group Select DT1.Clone.LoadDataRow (New Object() {grp(0)(0),grp(0)(1),grp(0)(2),grp.Sum(Function(h) h.Field(Of Double)(“Actual Hours”))},False)).CopyToDataTable

2 Likes