ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Macro, AutoFilter... (https://www.excelbanter.com/excel-discussion-misc-queries/196434-macro-autofilter.html)

Aline

Macro, AutoFilter...
 
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?

--
Aline

Dave Peterson

Macro, AutoFilter...
 
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:

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?

--
Aline


--

Dave Peterson


All times are GMT +1. The time now is 03:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com