Duplicate valus

vendor Account Document Number Amount
300003 51000447 54.86
300003 51000846 54.86
300084 51000992 5,566.00
300084 51000198 2,867.20
300062 51004554 672.00
300062 51000353 1,980.16
300062 51000552 888.00
300012 51000339 1,568.00
300012 51000320 2,559.72
300012 51000319 5,665.00
hai guys
if ‘‘vendor account’’ has duplicate values. Then i want document numbers(one by one) of duplicate values
51000447
51000846
  1. Read the excel and store in DT

  2. Filter the dt for getting Distinct Values
    DataTable dtdistinct=DataTable1.DefaultView.ToTable(true,"vendor Account")

  3. Loop above dtdistinct

Inside loop again filter to get the all the values based on distinct values

DataTable dtdistinct=DataTable1.Select("vendor address='"+row("vendor Address").ToString+"'").CopyToDataTable()