I have datatable as excel file and attached picture.
I want to check and remove duplicate row at col “item” and keep row if it has negative smallest value at col “quantity”
As my datatable, i want to remove the row highlighted yellow.
How to do to add condition into the my Lin.Q code below
(From row In table.AsEnumerable()
Group row By k1= row(“item”).toString.Trim
Let r = grp.Last
Order By Array.IndexOf(table.AsEnumerable.toArray,r)
Thanks in advance!Book1.xlsx (8.2 KB)