autofilters on worksheets within workbook
i'm using Excel 2007. I have about 12 worksheets within a workbook.
I want to know how I can clear the filters on all worksheets and return each worksheet to showing all records without going through each worksheet individually and clearing the filter. ie. can I click or do something just once that will clear the filters in all worksheets, or do I have to go to each s/sheet and clear the filter??? if this can only be done as a programming code, as i'm not really that smart, can you please tell me where I have to put this code. -- thanks Cheryl |
autofilters on worksheets within workbook
Cheryl,
You can use code similar to the following to accomplish this: Sub removeFilter() Dim rng As Range For Each sht In ThisWorkbook.Sheets Set rng = sht.Range("a1") rng.AutoFilter Next End Sub -- Regards, Eddie http://www.HelpExcel.com "cheryl" wrote: i'm using Excel 2007. I have about 12 worksheets within a workbook. I want to know how I can clear the filters on all worksheets and return each worksheet to showing all records without going through each worksheet individually and clearing the filter. ie. can I click or do something just once that will clear the filters in all worksheets, or do I have to go to each s/sheet and clear the filter??? if this can only be done as a programming code, as i'm not really that smart, can you please tell me where I have to put this code. -- thanks Cheryl |
autofilters on worksheets within workbook
where would I put the code stated below, please???
and how would I get it to run -- thanks Cheryl "HelpExcel.com" wrote: Cheryl, You can use code similar to the following to accomplish this: Sub removeFilter() Dim rng As Range For Each sht In ThisWorkbook.Sheets Set rng = sht.Range("a1") rng.AutoFilter Next End Sub -- Regards, Eddie http://www.HelpExcel.com "cheryl" wrote: i'm using Excel 2007. I have about 12 worksheets within a workbook. I want to know how I can clear the filters on all worksheets and return each worksheet to showing all records without going through each worksheet individually and clearing the filter. ie. can I click or do something just once that will clear the filters in all worksheets, or do I have to go to each s/sheet and clear the filter??? if this can only be done as a programming code, as i'm not really that smart, can you please tell me where I have to put this code. -- thanks Cheryl |
All times are GMT +1. The time now is 03:39 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com