![]() |
Extracting unique values from a list using VBA
Hi there (again),
Another challenge: Is there a way using VBA to extract all the unique values from a source coulmn and paste them to a target column? I know you can do it using autofilter and pivottables but the former is time consuming and the latter inelegant. Thanks Duncan |
Extracting unique values from a list using VBA
Yes, it is possible. All you need to do is record a macro while you do
it once, then you can re-run the macro whenever you need it. You may need to edit the macro, once recorded, to enable it to work with variable amounts of data etc. Hope this helps. Pete On Jan 25, 2:45*pm, dangerd wrote: Hi there (again), Another challenge: Is there a way using VBA to extract all the unique values from a source coulmn and paste them to a target column? I know you can do it using autofilter and pivottables but the former is time consuming and the latter inelegant. Thanks Duncan |
Extracting unique values from a list using VBA
On Jan 25, 2:49*pm, Pete_UK wrote:
Yes, it is possible. All you need to do is record a macro while you do it once, then you can re-run the macro whenever you need it. You may need to edit the macro, once recorded, to enable it to work with variable amounts of data etc. Hope this helps. Pete On Jan 25, 2:45*pm, dangerd wrote: Hi there (again), Another challenge: Is there a way using VBA to extract all the unique values from a source coulmn and paste them to a target column? I know you can do it using autofilter and pivottables but the former is time consuming and the latter inelegant. Thanks Duncan- Hide quoted text - - Show quoted text - so simple....thx |
Extracting unique values from a list using VBA
You're welcome.
Pete On Jan 25, 3:01*pm, dangerd wrote: so simple....thx |
Extracting unique values from a list using VBA
Add headers if you need to.
Then use Data|Filter|advanced filter (xl2003 menus) Record a macro when you do it and you'll have the code. Debra Dalgleish explains it he http://www.contextures.com/xladvfilter01.html#FilterUR dangerd wrote: Hi there (again), Another challenge: Is there a way using VBA to extract all the unique values from a source coulmn and paste them to a target column? I know you can do it using autofilter and pivottables but the former is time consuming and the latter inelegant. Thanks Duncan -- Dave Peterson |
All times are GMT +1. The time now is 02:15 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com