![]() |
Macro_creating sheets from AutoFilter list
Im trying to create a macro that will add number of new sheets depends the number of items on the list of column D. name it C1, C2, C3, C4, C5... AutoFilter the list, choose the first item, copy the content of active sheet and then paste on the C1. Continue AutoFilter, choose the second item, copy the content of active sheet and then paste on the C2. Do the same for the rest of items on the list. I have had a macro that add sheets, name the sheets, copy the contents of sheet to the new sheet after AutoFilter the list. The list is limited to 4 specific items. But sometimes the list changed, it has more than 5 or 6 different items. Any suggestion? Thanks -- Aline |
Macro_creating sheets from AutoFilter list
Take a look at these options:
Ron de Bruin's EasyFilter addin: http://www.rondebruin.nl/easyfilter.htm Code from Debra Dalgleish's site: http://www.contextures.com/excelfiles.html Create New Sheets from Filtered List -- uses an Advanced Filter to create separate sheet of orders for each sales rep visible in a filtered list; macro automates the filter. AdvFilterRepFiltered.xls 35 kb Update Sheets from Master -- uses an Advanced Filter to send data from Master sheet to individual worksheets -- replaces old data with current. AdvFilterCity.xls 55 kb If you're new to macros: Debra Dalgleish has some notes how to implement macros he http://www.contextures.com/xlvba01.html David McRitchie has an intro to macros: http://www.mvps.org/dmcritchie/excel/getstarted.htm Ron de Bruin's intro to macros: http://www.rondebruin.nl/code.htm (General, Regular and Standard modules all describe the same thing.) Aline wrote: Im trying to create a macro that will add number of new sheets depends the number of items on the list of column D. name it C1, C2, C3, C4, C5... AutoFilter the list, choose the first item, copy the content of active sheet and then paste on the C1. Continue AutoFilter, choose the second item, copy the content of active sheet and then paste on the C2. Do the same for the rest of items on the list. I have had a macro that add sheets, name the sheets, copy the contents of sheet to the new sheet after AutoFilter the list. The list is limited to 4 specific items. But sometimes the list changed, it has more than 5 or 6 different items. Any suggestion? Thanks -- Aline -- Dave Peterson |
All times are GMT +1. The time now is 03:50 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com