Hi,
I need help with the following problem. I have a long column starting in cell AQ3 with a lot of values (where the length of the column and the values might change) and I want to copy the unique values in this column in the column next to it starting with cell AR3. I tried to record a code and slightly modify it using the advanced filter method, however, for some reason it gives me errors (it says that the AdvanceFilter method of range class failed). This is the code I have so far:
Dim TargetPos As Range
Set Target = Range("ar3")
Sheets("Report1").Range("aq3", Range("aq65536").End(xlUp)).AdvancedFilter _
Action:=xlFilterCopy, CopyToRange:=TargetPos, Unique:=True
If someone could provide me with the correction or can suggest an alternative method to Advancedfilter, I would really appreciate it.
I need help with the following problem. I have a long column starting in cell AQ3 with a lot of values (where the length of the column and the values might change) and I want to copy the unique values in this column in the column next to it starting with cell AR3. I tried to record a code and slightly modify it using the advanced filter method, however, for some reason it gives me errors (it says that the AdvanceFilter method of range class failed). This is the code I have so far:
Dim TargetPos As Range
Set Target = Range("ar3")
Sheets("Report1").Range("aq3", Range("aq65536").End(xlUp)).AdvancedFilter _
Action:=xlFilterCopy, CopyToRange:=TargetPos, Unique:=True
If someone could provide me with the correction or can suggest an alternative method to Advancedfilter, I would really appreciate it.