0
0
Excelspreadsheet~10 mins

Filtering data with AutoFilter in Excel - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to apply AutoFilter to the data range A1:D10.

Excel
ActiveSheet.Range("A1:D10").[1]
Drag options to blanks, or click blank then click option'
ASelect
BFilter
CSort
DAutoFilter
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Filter' instead of 'AutoFilter' causes an error.
Using 'Sort' does not apply filtering.
2fill in blank
medium

Complete the code to filter the first column for cells equal to "Apple".

Excel
ActiveSheet.Range("A1:D10").AutoFilter Field:=1, Criteria1:=[1]
Drag options to blanks, or click blank then click option'
A'Apple'
BApple
C"Apple"
D="Apple"
Attempts:
3 left
💡 Hint
Common Mistakes
Not using quotes around the criteria causes a syntax error.
Using single quotes instead of double quotes is incorrect.
3fill in blank
hard

Fix the error in the code to filter column 2 for values greater than 100.

Excel
ActiveSheet.Range("A1:D10").AutoFilter Field:=2, Criteria1:=[1]
Drag options to blanks, or click blank then click option'
A>100
B">100"
C"100"
D100
Attempts:
3 left
💡 Hint
Common Mistakes
Using >100 without quotes causes an error.
Using just 100 filters for equal to 100, not greater than.
4fill in blank
hard

Fill both blanks to filter column 3 for values between 50 and 200.

Excel
ActiveSheet.Range("A1:D10").AutoFilter Field:=3, Criteria1:=[1], Criteria2:="<=200", Operator:=[2]
Drag options to blanks, or click blank then click option'
A">=50"
BxlAnd
CxlOr
D"<=200"
Attempts:
3 left
💡 Hint
Common Mistakes
Using xlOr instead of xlAnd combines criteria incorrectly.
Not quoting the criteria strings causes errors.
5fill in blank
hard

Fill both blanks to filter column 3 for values between 50 and 200 using Criteria1 and Criteria2.

Excel
ActiveSheet.Range("A1:D10").AutoFilter Field:=3, Criteria1:=[1], Operator:=xlAnd, Criteria2:=[2]
Drag options to blanks, or click blank then click option'
A">=50"
B"<=200"
CxlAnd
D"50"
Attempts:
3 left
💡 Hint
Common Mistakes
Using numeric values without quotes causes errors.
Mixing up Criteria1 and Criteria2 values.