Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autofilter more than 1 worksheet
I have a workbook that contains 4 worksheets, all with lots of data on them.
All have autofilter set up and what I am hoping to achieve is to set the criteria on 1 worksheet in the first column (say in cell B1) that will then become the default criteria on all the other worksheets. I found the following code through google but can't get it to work - I assume the first macro can be pasted into a module but I'm not sure what to do with the second bit. OR is there an easier way Thanks in advance for any help Private Sub Worksheet_Calculate() MsgBox ActiveSheet.AutoFilter.Filters(1).Criteria1 End Sub 'Having tht criteria, it can then be applied to any other filter in any other sheet. 'CODE set wsThis = Activesheet for each ws in worksheets if ws.name < wsThis.name then ws.autofilter.filter(1).criteria = right(wsthis.autofilter.filter(1).criteria,len(wst his.autofilter.filter(1).criteria)-1 ) end if next |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
AUTOFILTER IN A PROTECTED WORKSHEET | Excel Discussion (Misc queries) | |||
autofilter into another worksheet | Excel Discussion (Misc queries) | |||
autofilter and worksheet protection | Excel Programming | |||
Using Autofilter on a Protected Worksheet | Excel Discussion (Misc queries) | |||
Autofilter More than One Worksheet | Excel Programming |