How To Find Dulpicate Row in Excel And Update A column with Status As its Duplicate
Hi Team,
An excel having clolumns bank account number , From Date , To Date and Status
if there is any duplicate vallues occured like Three columns bank account number , From Date , To Date Are Same ( See Below Example) then we need to update the status column as Duplicate , If two columns are same and and Third columns is different then its not a duplicate value if and only if the three columns are same then only we need to update the status.
Bank Account Number From Date To Date Status
123456789 22-08-2006 01-10-2007
123456789 03-07-2010 05-09-2010
123456789 22-08-2006 01-10-2007 Duplicate
123456789 22-08-2006 01-11-2007
423823157 30-09-2015 09-09-2017
123456789 22-08-2006 01-10-2007 Duplicate
423823157 30-09-2015 09-09-2017 Duplicate
423823157 30-09-2016 08-09-2017
Thanks In advance
Amarnadh
There are a number of ways to do this. For some tips on working with Excel see this post.
One way would be to export the data to a datatable and then use a dataview to look for duplicates. This is a little more complicated and you will need to know how to use the components (google search for DataTable and DataView).
Another way would be to read one row at a time (using GetCellValue) and store the results for the row in a lookup table. Before storing in the lookup table check to see if the bank account is already present in the lookup table. If it is present, then check the other columns to determine if this is a duplicate.