Macro, AutoFilter...

A

Aline

I have create a macro that does
1. create 3 sheet, named: C1, C2 & C3
2. Select the fruit column,AutoFilter
3. Choose “Apple†which is the first on the list; select the sheet; and then
copy the sheet to the C1
3. Choose “Grape†which is the second item on the list; select the sheet and
then copy the sheet to the C2
4. Choose “Watermelon†which is the second item on the list; select the
sheet and then copy the sheet to the C3

My question is how do I change my marco so it will pick up any fruit (e.g.
Banana, Pear, Watermelon), what ever it is on the list and excute the steps
according.

Any suggestion?
 
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