Hello. I want to extract and copy data from several columns in Sheet1 without duplication and copy it to Sheet2 Starting from column 1 to column 10 ( A : J ) Starting from row 6
and copy it into Sheet 2 in row2 (R:Z)
I used this code, but it always repeats the first value while copying the lists. I want it to copy only the values.
and copy it into Sheet 2 in row2 (R:Z)
I used this code, but it always repeats the first value while copying the lists. I want it to copy only the values.
VBA Code:
Sub test()
Application.ScreenUpdating = False
Sheet2.Range("R1:Z2000").ClearContents
Sheet1.Range("A6:A10000").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Sheet2.Range("R1"), Unique:=True
Sheet1.Range("B6:B10000").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Sheet2.Range("S1"), Unique:=True
Sheet1.Range("C6:C10000").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Sheet2.Range("T1"), Unique:=True
Sheet1.Range("D6:D10000").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Sheet2.Range("U1"), Unique:=True
Sheet1.Range("E6:E10000").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Sheet2.Range("V1"), Unique:=True
Sheet1.Range("F6:F10000").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Sheet2.Range("W1"), Unique:=True
Sheet1.Range("G6:G10000").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Sheet2.Range("X1"), Unique:=True
Sheet1.Range("H6:H10000").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Sheet2.Range("Y1"), Unique:=True
Sheet1.Range("I6:I10000").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Sheet2.Range("Z1"), Unique:=True
Application.ScreenUpdating = True
End Sub