Macro_creating sheets from AutoFilter list

A

Aline

I’m 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
 
D

Dave Peterson

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 here:
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.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top