![]() |
macro to scan list
If anyone can help that would be great,
I need a macro to scan a list of text in column A of sheet1, several text names are repeated multiple times in this column. I then want the macro to return only one cell of each text name that occurs in the list to column B on sheet2. I know this should be easy, but Im still learing. Thanks! |
macro to scan list
Hi Matto;
This will do what your talking about on the same sheet. Excel will not let you do a unique filter to a different location on a different sheet. Sub Macro1() Range("A1").Select Range(Selection, Selection.End(xlDown)).Select Selection.AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range("B1" _ ), Unique:=True End Sub Thanks, Greg -----Original Message----- If anyone can help that would be great, I need a macro to scan a list of text in column A of sheet1, several text names are repeated multiple times in this column. I then want the macro to return only one cell of each text name that occurs in the list to column B on sheet2. I know this should be easy, but Im still learing. Thanks! . |
macro to scan list
Hi,
This functionality already exists in Excel: -select your data (column A) including the header name. -menu Data Filter Advanced Filter: Action: Copy to another location Criteria Range: <leave blank Copy To: $B$1 <---- to copy to column B Unique Record Only: make sure it is checked Click OK Done! Comment: the feature doesn't allow you to send the filtered data to another sheet though. However, you can use it to filter within the same sheet as we just did, then copy the result to the other sheet. Regards, Sebastien "Matto" wrote: If anyone can help that would be great, I need a macro to scan a list of text in column A of sheet1, several text names are repeated multiple times in this column. I then want the macro to return only one cell of each text name that occurs in the list to column B on sheet2. I know this should be easy, but Im still learing. Thanks! |
All times are GMT +1. The time now is 08:48 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com