I'm trying to copy and paste non duplicates values from one sheet to another sheet in excel. I need to copy and paste only unique values from formula column. I tried below code from stack exchange but it is working only on non formula columns. How do i copy paste non duplicate values only from formula column?
Sub CopyUnique()
Dim s1 As Worksheet, s2 As Worksheet
Set s1 = Sheets("Main")
Set s2 = Sheets("Count")
s1.Range("B:B").Copy s2.Range("A1")
s2.Range("A:A").RemoveDuplicates Columns:=1, Header:=xlNo
End Sub