B
BrianR
I have the following code to extract unique values from a column of data. I
need to replace the "O2" with a variable. Does this field only allow " " and
not variables?
BrianR
'extract unique IDs from column A
With Sheets(Sheet)
Range("A2:A" & last_row_used_local).AdvancedFilter
Action:=xlFilterCopy, _
CopyToRange:=.Range("O2"), Unique:=True
'sort the unique IDs
.Range(.Range(store_list_column),
..Range(store_list_column).End(xlDown)) _
.Sort Key1:=.Range("O2"), Order1:=xlAscending, Header:=xlYes
End With
need to replace the "O2" with a variable. Does this field only allow " " and
not variables?
BrianR
'extract unique IDs from column A
With Sheets(Sheet)
Range("A2:A" & last_row_used_local).AdvancedFilter
Action:=xlFilterCopy, _
CopyToRange:=.Range("O2"), Unique:=True
'sort the unique IDs
.Range(.Range(store_list_column),
..Range(store_list_column).End(xlDown)) _
.Sort Key1:=.Range("O2"), Order1:=xlAscending, Header:=xlYes
End With