Question

Duplicate entries in excel

  • 25 August 2023
  • 3 replies
  • 223 views

Badge +5

Hi,

I have two excel files , in the first one there are some document no’s which i need to pickup one by one & find them in the other excel, if a match is found then I need to log it.

The problem is that the doc no’s in the first excel can get repeated any number of times and if a match is found then it should continue to pickup the next record, although there can be a possibility that the next record can be the same doc no as the above, refer to the screenshot below :

 

So according to the above image, the bot should pickup the first record (14669), if match is found then it should ignore the rest of the 3 records and pickup the next record.

 

How can this be achieved? Any help would be appreciated :)


3 replies

Userlevel 3
Badge +6

Maintain a list of already actioned items, check if current item is already actioned and skip the iteration.

Loop each row in excel
 if current item exist in actioned items
 continue
.
… other processing steps
.
add current item to actioned list
end excel loop

Badge +5

Maintain a list of already actioned items, check if current item is already actioned and skip the iteration.

Loop each row in excel
 if current item exist in actioned items
 continue
.
… other processing steps
.
add current item to actioned list
end excel loop

Hi Sumit,

Thanks for your reply. I have to pick up records one by one from one excel and match them from the other excel, so how can i already prepare a list of actioned items beforehand. The continuing of the loop has to be on the fly if it finds a duplicate.

Badge

Hello, 

 

Step 1, Use Excel Advance: Get multiple cells , and assign the value to a “Table” Variable; 

Step 2, Use Data Table: Remove Duplicate Rows, to remove the duplicate rows in that “Table” Variable;

tips:

you may also need to count the rows of the “Table” after step2, to get the actual distinct number or rows for the “Table” variable, which count can be used in next Loop step to Find the matching rows in the second Excel file. 

Reply