Check Duplicate Values(If any) in an excel sheet

I want to check a column that may contain duplicate values. If any value is duplicate then that may check the corresponding date of that column with another sheet’s date column. If both of the values(amount) and corresponding date both then it will check another corresponding column (assignment number) to make sure about which entry this is.

I am uploading two separate sheets for better understanding.

If this can be solved with a nested loop solution then what will be the easiest way? It would be really helpful if any relevant or similar .xaml is available. Or at least some idea.

Thank you


image

These are the two sheets for my value crosscheck.

You can use linq, join 2 datatable with “where” conditions instead of using 2 loop inside for better performance and reduce time running.

1 Like

how can I use where condition?

Datatable.AsEnumerable.Where(function(row) condition here).Select(Function(r) r).CopyToDataTable

You can use linq with condition like this one, the result is a new datatable filtered

I am having main sheet S1 and i want to add data in S2 sheet. before adding data into S2 i need to check its already present . Can i have solution?

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.