Hi have 2 excels 1 & 2
i want to look for common Gross in both sheets and filter out those common but i want that from file 1
1.xlsx (8.3 KB)
2.xlsx (8.3 KB)
Hi have 2 excels 1 & 2
i want to look for common Gross in both sheets and filter out those common but i want that from file 1
1.xlsx (8.3 KB)
2.xlsx (8.3 KB)
Hi @manoj_verma1,
Try this.
matched_Data = In_DataTable1.AsEnumerable().Where(function(row) In_DataTable2.AsEnumerable().Select(function(r) r(“Gross”).ToString).Any(function(x) x = row(“Gross”).tostring)).CopyToDataTable()
Or
dt_matched = (from s i dt1.AsEnumerable() from r in d2.AsEnumerable where s(“Gross”).tostring.Equals(r(“Gross”).ToString) Select S).CopyToDatatable()
Hope it helps.
Hi,
Can you try the following sample?
arrDr = dt1.AsEnumerable.Where(Function(r) dt2.AsEnumerable.Any(Function(r2) r2("Gross").ToString=r("Gross").ToString)).ToArray
Sample20230407-5L.zip (14.6 KB)
Regards,
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.