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


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).CopyToDataTable

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