0
0
Google Sheetsspreadsheet~10 mins

SORT and SORTN functions in Google Sheets - Interactive Code Practice

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

Complete the code to sort the range A1:B5 by the first column in ascending order.

Google Sheets
=SORT(A1:B5, [1], TRUE)
Drag options to blanks, or click blank then click option'
A2
B3
C0
D1
Attempts:
3 left
💡 Hint
Common Mistakes
Using 0 as the column number causes an error.
Using 2 sorts by the second column, not the first.
2fill in blank
medium

Complete the code to sort the range A1:C10 by the third column in descending order.

Google Sheets
=SORT(A1:C10, [1], FALSE)
Drag options to blanks, or click blank then click option'
A2
B1
C3
D4
Attempts:
3 left
💡 Hint
Common Mistakes
Using 2 sorts by the second column instead of the third.
Using TRUE sorts in ascending order, not descending.
3fill in blank
hard

Fix the error in the formula to get the top 3 values from range A1:A10 sorted descending.

Google Sheets
=SORTN(A1:A10, [1], 0, 1, FALSE)
Drag options to blanks, or click blank then click option'
A3
B2
C1
D0
Attempts:
3 left
💡 Hint
Common Mistakes
Using 1 returns only the top value, not top 3.
Using 0 returns all values, not limited to top 3.
4fill in blank
hard

Fill both blanks to sort range B2:D8 by the second column ascending and then the third column descending.

Google Sheets
=SORT(B2:D8, [1], TRUE, [2], FALSE)
Drag options to blanks, or click blank then click option'
A2
B1
C3
D4
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up column numbers causes wrong sorting order.
Using TRUE for descending order is incorrect.
5fill in blank
hard

Fill all three blanks to get the top 5 unique values from A1:A20 sorted descending.

Google Sheets
=SORTN(A1:A20, [1], [2], 1, [3])
Drag options to blanks, or click blank then click option'
A5
B1
CFALSE
DTRUE
Attempts:
3 left
💡 Hint
Common Mistakes
Using 0 for display_ties_mode includes duplicates.
Using TRUE sorts ascending, not descending.