Jump to content
UBot Underground

Search Lists For Duplicates, Delete Both


Recommended Posts

Can anyone tell me how to compare 2 lists and if a duplicate is found delete it from both lists?

 

I do research everyday and if an item is already on yesterday's list I don't want to re-research the same thing again today.  With this in mind I want to compare both lists and if a duplicate is found, delete them both.

 

Thanks Ubotters!

Peace,
LJ

Link to post
Share on other sites

Concept. It may be the others better.

clear all data
add list to list(%List1,$list from text("1,2,3,4,5,6,7",","),"Delete","Global")
add list to list(%List2,$list from text("4,5,6,7,8,9,0",","),"Delete","Global")
add list to list(%ListDel,$common list items(%List1,%List2),"Delete","Global")
set list position(%ListDel,0)
loop($list total(%ListDel)) {
    set(#Text,$next list item(%ListDel),"Global")
    remove text from list(%List1,#Text,"First")
    remove text from list(%List2,#Text,"First")
}
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...