subrahmanyam85
New Member
- Joined
- Aug 26, 2014
- Messages
- 20
I am trying to copy a column from pivot table into another column with unique values in same sheet.Pivot table header is in A6 to F6.
That column contains Year values and there are no filters on it.
While executing the below code it is showing an error like "Application Defined or Object Defined Error"
===============================================================
Private Sub GetUnique()
Dim LR As Long
LR = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row
Range("A7:A" & LR).AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range("H7"), Unique:=True
End Sub
===============================================================
Can you please help me?
That column contains Year values and there are no filters on it.
While executing the below code it is showing an error like "Application Defined or Object Defined Error"
===============================================================
Private Sub GetUnique()
Dim LR As Long
LR = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row
Range("A7:A" & LR).AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range("H7"), Unique:=True
End Sub
===============================================================
Can you please help me?
Last edited: