autofilter

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

if i have 4 worksheets in a workbook how can i autofilter
all sheets at the same time.

thanks

mark
 
You have to apply the autofilter to each sheet separately if you do it manually.

Maybe you could record a macro when you do one and then just execute that macro
against the other 3 sheets (or whenever you wanted it).
 
What type of macro.
Is there a web site i could go to to learn more about
these.

Thanks
-----Original Message-----
You have to apply the autofilter to each sheet
separately if you do it manually.
 
Just to add to Gord's response.

Select the first worksheet
now hit tools|macro|record new macro

You should see a little toolbar pop up.

Select your range and turn on the data|filter|autofilter.

(You're recording your actions)

Now hit the "stop recording" button on that little toolbar.

hit alt-f11 to see the VBE (where macros live)
hit ctrl-r to see the project explorer--a lot like windows explorer.

Find your workbook's name and select it.
hit the asterisk on the numeric keypad to expand all the "components" of the
project.

Look for Module1 and double click on it.

You'll see how excel your recorded actions.

hit alt-f11 once more to get back to excel.

Remove that filter (Data|filter|autofilter)

Now hit alt-f8
select the macro you just recorded (it'll be called macro# if you didn't choose
a nicer name)

Watch what happens.

If your data is laid out the same all all those pages, you may not even need to
do much tweaking.

===
Ps. If your headers are just in row 1, you could select all the columns in the
range and not have to worry about where the data ends on the other sheets.
 
Back
Top