macro to filter/print pages using certain criteria

  • Thread starter Thread starter mark
  • Start date Start date
M

mark

Hi,
This is just a followup to my other post. Excel doesn't
have functionality built-in to filter by pages. How
difficult would it be to write a macro for this and what
would be its general structure? Also, does anyone know if
an equivalent macro has already been written and possibly
available on the web?

Thanks,
Mark
 
Hi
By pages do you mean sheets? If sheets, do you want to filter based on
their sheet name??
In that case, something like

For each wks in ActiveWorkBook.Worksheets
If not CriteriaIsMet(wks.Name) then
Activeworkbook.Worksheets(wks.Name).Hidden = True
End If
Next wks

Where CriteriaIsMet is some Criteria you have based on the worksheet
name. This might involve the InStr function or Find Method - depends
how flexible you need your criteria to be.

regards
Paul
 
Back
Top