问题
this is a simple issue with simple VBA but I have not been able to find the answer through multiple searches.
I want to be able to remove duplicates in a column A in Sheet 2 of my workbook by pressing a button assigned to the macro in Sheet 1.
This is the code I have assigned to the button in Sheet 1:
Sub RemoveDupes()
Sheets("Sheet2").Range("A1:A10350").RemoveDuplicates
End Sub
This code seems to just try to remove duplicates in the column in which the button exists or whatever column in whatever sheet I have clicked on. How do I specify to remove duplicates in column A in Sheet 2?
来源:https://stackoverflow.com/questions/42827106/vba-for-removing-duplicates-in-a-specific-column-in-another-tab