wks2.Columns(1, CharacteristicField).Select
Range(Cells(2, CharacteristicField), Cells(Lastrow, CharacteristicField)).AdvancedFilter Action:=xlFilterInPlace, Unique:=True
I am trying to find all the unique values within a column, passed from another routine so that I can then count the number of unique items, autofilter based on the value of each unique item, and then some manipulations with the autofiltered data.
I have everything else working but this advanced filter based on a variable. The variable passed in is a column reference, if you haven't guessed (CharacteristicField). When trying to execute this section of the code, I get a 1004 error.
Any help would be great in completing this last step.
Bookmarks