Mangosteenlu
New Member
- Joined
- Jul 5, 2015
- Messages
- 12
Hi All,
I only know a little about VBA, so can someone please help me to amend the below VBA code to perform the same task in worksheets (1), (2), and (3), not in worksheet (4), (5) and (6)?
Basically I just want to automatically filter column A with criteria of 'Overview' for worksheets (1) (2) and (3), the rest worksheet (4), (5), and (6) does not perform this task. so i wrote a simple VBA code 1 below, but it only works for the worksheet (1), not others. Also i need to take off the autofilter once the task is performed. (code 2 below does not seem to work) . Thank you for your help.
1. Sub Auto_Filter_with_Criteria_Overview ()
Range("A11:A182").AutoFilter field:=1, Criteria1:="Overview"
End Sub
2. Sub Take_off_Auto_Filter ()
Range("A11:A182").AutoFilterMode=false
I only know a little about VBA, so can someone please help me to amend the below VBA code to perform the same task in worksheets (1), (2), and (3), not in worksheet (4), (5) and (6)?
Basically I just want to automatically filter column A with criteria of 'Overview' for worksheets (1) (2) and (3), the rest worksheet (4), (5), and (6) does not perform this task. so i wrote a simple VBA code 1 below, but it only works for the worksheet (1), not others. Also i need to take off the autofilter once the task is performed. (code 2 below does not seem to work) . Thank you for your help.
1. Sub Auto_Filter_with_Criteria_Overview ()
Range("A11:A182").AutoFilter field:=1, Criteria1:="Overview"
End Sub
2. Sub Take_off_Auto_Filter ()
Range("A11:A182").AutoFilterMode=false