Hi Folks,
I'm trying to create a vba filter to copy all unique numbers from a column that contains some cells with text (ex. ID Crew 3), others with numbers. (ex. 61008677), and paste the result in another worksheet.
Here's my current code to get unique values. I still haven't figured out how to filter the list for numbers. I hit a lot of errors trying to do x1FilterCopy, so my best result here is just an edited recorded macro
POHistory is a named list going from T2 to the end of the data in the column
I'm trying to create a vba filter to copy all unique numbers from a column that contains some cells with text (ex. ID Crew 3), others with numbers. (ex. 61008677), and paste the result in another worksheet.
Here's my current code to get unique values. I still haven't figured out how to filter the list for numbers. I hit a lot of errors trying to do x1FilterCopy, so my best result here is just an edited recorded macro
POHistory is a named list going from T2 to the end of the data in the column
Code:
Sub CopyUniquePOs()'
' CopyUniquePOs Macro
'
Range("POHistory").AdvancedFilter Action:=xlFilterInPlace, Unique:=True
Sheets("Order History").Select
Range("T3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("PO Totals").Select
Range("A2").Select
ActiveSheet.Paste
Sheets("Order History").ShowAllData
End Sub