是一個呼叫Excel洗掉重復值功能批量洗掉多列每一列的重復值的VBA代碼
Sub Macro1()
Dim i, j
For i = 1 To [a1].End(xlToRight).Column
ActiveSheet.Range(Cells(1, i), Cells(Cells(1048576, i).End(xlUp).Row, i)).RemoveDuplicates Columns:=1, Header:=xlNo
Next
End Sub
uj5u.com熱心網友回復:
Sub Macro1()
Dim i, j
For i = 1 To [a1].End(xlToRight).Column
ActiveSheet.Range(Cells(1, i), Cells(ActiveSheet.Cells(1048576, i).End(xlUp).Row, i)).RemoveDuplicates Columns:=1, Header:=xlNo
Next
End Sub
uj5u.com熱心網友回復:
Sub Macro1()
Dim i, j
For i = 1 To [a1].End(xlToRight).Column
ActiveSheet.Range(Cells(1, i), Cells(ActiveSheet.Cells(1048576, i).End(xlUp).Row, i)).RemoveDuplicates Columns:=1, Header:=xlNo
Next
End Sub
Cells(ActiveSheet.Cells(1048576, i).End(xlUp).Row, i)
uj5u.com熱心網友回復:
大哥,沒錯呀,是不是你沒有給作業表里放資料啊轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/25205.html
標籤:VBA
上一篇:求助VBA代碼
下一篇:陣列范圍超出定義范圍怎么處理啊
