Home |
Search |
Today's Posts |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Ron:
Your code captures the general principle of what I am looking for, however, I need to list unique date from several list of data on multiple spreadsheets and copy this data to a separate worksheet. To be exact, I have 32 spreadsheets, one summary sheet and 31 detail data sheets for each day of the month. Daily entries on the 31 sheets may be repeated for a client but on the summary sheet I need the client to be listed only once. Please advise how I may modify your code below to accomplish this. Please note also that when I executed the program with your code, the first value in my list was repeated once (i.e. there were two occurances of that value). I rectified this by changing "Header:=xlYes" to "Header:=xlNo". Kindly advise whether this was the correct approach. Thank you! -- BG "Ron Coderre" wrote: 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? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
FInd common data in one column then add number in adjacent column | Excel Worksheet Functions | |||
Find a text from a column in a text string within another column? | New Users to Excel | |||
How do I find a change of data in an excel column ? | Excel Discussion (Misc queries) | |||
Excel: Find/Replace for Data Validation text or Worksheet Objects | Excel Discussion (Misc queries) | |||
Macro to find text string in a column and paste data in another | Excel Discussion (Misc queries) |