I have the following code that works as intended, copying A1:B100000 and pasting unique values in 'sort' worksheet.
ws2.Range("A1:B100000").AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=ThisWorkbook.Worksheets("Sort").Range("b1"), Unique:=True
I want to change it to now copy A1:A100000 & H1:H100000 and paste in the same location.
I have tried the following but get a '1004' error.
ws2.Range("A1:A100000,H1:H100000").AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=ThisWorkbook.Worksheets("Sort").Range("b1"), Unique:=True
ws2.Range("A1:B100000").AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=ThisWorkbook.Worksheets("Sort").Range("b1"), Unique:=True
I want to change it to now copy A1:A100000 & H1:H100000 and paste in the same location.
I have tried the following but get a '1004' error.
ws2.Range("A1:A100000,H1:H100000").AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=ThisWorkbook.Worksheets("Sort").Range("b1"), Unique:=True