I'm trying to write a code that will filter unique records from Column A & B and pastes the unique records in column Y & Z (See attached). It flags a (run-time error 1004) message without highlighting the error. Can someone assist.
Thank you kindly
Sub mac()LRow = Range("A" & Rows.Count).End(xlUp).Row Range("A7:B" & LRow).AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range("Y7:Z" & LRow), Unique:=True End Sub