VBA for removing duplicates in a specific column in another tab

半世苍凉 提交于 2021-01-29 05:30:26

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!