Find Duplicates

1234 | Yogita
5678 | Minal
9101 | Nikhil
1122 | Akshay
1345 | Minal

above are the two excel column find the duplicate from Transaction_Reference column and want output below then send mail duplicate find

Journal_Number Transaction_Reference

                5678       |  Minal 
                1345       |  Minal

and also if excel is empty code still running

Hi @Yogita_Gaikwad

How about this expression?

(From p in DT.Select() where( From q in DT.Select() where q("Transaction_Reference").Equals(p("Transaction_Reference")) Select q).ToArray.Count>1 Select p).ToArray.CopyToDataTable()


if the excel is empty it gives an error i want code is not gives an error if the excel is empty

Duplicate : Find the Duplicates in Excel