HI all, i would like to find any data in A:A that matches any data in D:D and removing all names that match, i have made a example sheet and added a few notes to it, would like to do it all through VBA. thanks for any help.
HI all, i would like to find any data in A:A that matches any data in D:D and removing all names that match, i have made a example sheet and added a few notes to it, would like to do it all through VBA. thanks for any help.
Hi Ditch1983
Copy this code in uf2
This code for cmdremovePlease Login or Register to view this content.
Please Login or Register to view this content.
Last edited by sintek; 03-18-2017 at 08:46 AM.
This code should copy duplicates to Sheet3
Please Login or Register to view this content.
Last edited by sintek; 03-18-2017 at 09:07 AM.
hey sintek thanks for the responce, these seem to do the job, only thing is what i may not have been clear about, on the one that removes any matching from the list, i need it to loop through and remove all that match in the list in 1 click, not just remove the selected 1, hope this make sense. Thanks
Ok yeah sure, makes sense
Also with the filter 1 I only want it to filter what is in the combo box, but it seems to just copy everything over. Thanks, and sorry for been a pain.
Try this for uf3
Please Login or Register to view this content.
Hey Ditch1983
Am stuck with listbox item find and remove....Am only able to clear as you move down listbox. Am still pretty new with vba.
Ok np thanks for trying, maybe if each value is loaded into text boxes and removed that way instead of listbox ? I could then modif it to dynamically add txt boxes as needed, as there will never be more then 10 names in a list.
Hey Ditch1983
I figured it out. This code will remove all selected in listbox
Click on listbox in UserformPlease Login or Register to view this content.
In the listbox properties, you have to set the multiselect to fmMultiSelectMulti
Then when your form runs, you must select all the items and run macro.
ah nice one thank you for all your help Sintek, i need the whole process to be automatic but i just changed a little bit and all runs as i needed thank you again for help. here is what i changed
Private Sub UserForm_Initialize()
Dim i
Dim ListArray As Variant
With Sheets("Sheet1")
ListArray = .Range(.Range("a2"), .Range("a" & Rows.Count).End(xlUp))
End With
uf2.lb1.List = ListArray
For i = 0 To lb1.ListCount - 1
lb1.Selected(i) = True
Next i
End Sub
so now it loads list and select's all in list.
Good stuff...Glad I could help.
Please mark thread as solved on top - Thread tools
And pretty pls click on add reputation star for rep points.
Already done all that
Shot thanks
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks