i have a excel file as follows: if the data in row a and row b is the same , then sum the row c data ,

the result excel file like

Try this
(From row In DT.AsEnumerable()
Group row By Name = row.Field(Of String)("Name"), Year = row("Year") Into Group
Let SalarySum = Group.Sum(Function(r) (r.Field(Of Double)("Salary")))
Select DT.Clone.Rows.Add(Name, Year, SalarySum)).CopyToDataTable()
Regards,
thanks a lot! could u give me a demo xaml?
(From row In DT.AsEnumerable()
Group row By Name = row.Field(Of String)("Name"), Year = row("Year") Into Group
Let SalarySum = Group.Sum(Function(r) (r.Field(Of Double)("Salary")))
Select DT.Clone.Rows.Add(Name, Year, SalarySum)).CopyToDataTable()
Output:

Sequence22.xaml (10.4 KB)
Cheers!!
Have a look here for the different option of grouping data
if there is a new row d - tax fee, how to calculate the row d like row c?
