Complete the code to apply AutoFilter to the data range A1:D10.
ActiveSheet.Range("A1:D10").[1]
The AutoFilter method applies filtering to the specified range.
Complete the code to filter the first column for cells equal to "Apple".
ActiveSheet.Range("A1:D10").AutoFilter Field:=1, Criteria1:=[1]
The criteria must be a string enclosed in double quotes.
Fix the error in the code to filter column 2 for values greater than 100.
ActiveSheet.Range("A1:D10").AutoFilter Field:=2, Criteria1:=[1]
The criteria must be a string with the operator and number inside quotes.
Fill both blanks to filter column 3 for values between 50 and 200.
ActiveSheet.Range("A1:D10").AutoFilter Field:=3, Criteria1:=[1], Criteria2:="<=200", Operator:=[2]
Use Criteria1 for the lower bound and Operator xlAnd to combine with Criteria2.
Fill both blanks to filter column 3 for values between 50 and 200 using Criteria1 and Criteria2.
ActiveSheet.Range("A1:D10").AutoFilter Field:=3, Criteria1:=[1], Operator:=xlAnd, Criteria2:=[2]
Criteria1 is the lower bound >=50, Criteria2 is the upper bound <=200, Operator xlAnd combines them.
