find every different text or data in a column - for Excel
Heres something I hope you can work with....
Option Explicit
Sub ExtractUniqueAndSort()
With Sheets("Sheet1")
.Range("A1:A20").AdvancedFilter _
Action:=xlFilterCopy, _
CopyToRange:=.Range("C1"), _
Unique:=True
.Range(.Range("C1"), .Range("C1").End(xlDown)) _
.Sort Key1:=.Range("C2"), Order1:=xlAscending, Header:=xlYes
End With
End Sub
***********
Regards,
Ron
XL2002, WinXP-Pro
"Robert" wrote:
Ron, your code is very helpful compared to using the extract unique formulas
which is slow and memory intensive. If you have the time, could you amend
your code for me to sort the extracted list in ascending order.
Thank you
Robert
"Ron Coderre" wrote:
Something to get you started...
If your list is in Cells A1:A20 on Sheet1 with
A1: Field1
C1: Field1
Option Explicit
Sub ExtractUnique()
Sheets("Sheet1").Range("A1:A20").AdvancedFilter _
Action:=xlFilterCopy, _
CopyToRange:=Range("C1"), _
Unique:=True
End Sub
That will extract all unique values from the Field1 range into the a new
range beginning in Cell C1.
Does that help?
***********
Regards,
Ron
XL2002, WinXP-Pro
"Space Elf" wrote:
I have rows of data that I would like to the program to pick through for
sorting. By using one column, I would like to find / make a list of each
different text or data going down that column. Is this possible?
|