
The following code will delete duplicate data for each column.
Sub test()
For i = 1 To 6
Set myData = Range(Cells(1, i), Cells(7, i))
Set myCrit = Range(Cells(9, i), Cells(10, i))
Set myDest = Range(Cells(13, i).Address)
myData.AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=myCrit, CopyToRange:=myDest, Unique:=True Next i
End Sub
For i = 1 To 6
Set myData = Range(Cells(1, i), Cells(7, i))
Set myCrit = Range(Cells(9, i), Cells(10, i))
Set myDest = Range(Cells(13, i).Address)
myData.AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=myCrit, CopyToRange:=myDest, Unique:=True Next i
End Sub
讀者回應 ( 0 意見 )
訂閱發佈留言 (Atom)
發佈留言
Please leave your name and tell me what you thought about this site. Comments, suggestions and views are welcomed.
如果這篇文章對你有幫助,那請留個訊息給我~