Bird
Raised Fist0
Google Sheetsspreadsheet~10 mins

Removing duplicates in Google Sheets - Interactive Code Practice

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

Complete the formula to remove duplicates from the range A1:A10.

Google Sheets
=UNIQUE([1])
Drag options to blanks, or click blank then click option'
AA10
BA1
CA1:A10
DA1:A9
Attempts:
3 left
💡 Hint
Common Mistakes
Using a single cell instead of a range.
Selecting a range that does not include all data.
2fill in blank
medium

Complete the formula to remove duplicates from columns A and B together (rows 1 to 10).

Google Sheets
=UNIQUE([1])
Drag options to blanks, or click blank then click option'
AA1:B10
BA1:A10
CB1:B10
DA1:B9
Attempts:
3 left
💡 Hint
Common Mistakes
Selecting only one column when duplicates depend on multiple columns.
Using an incomplete range.
3fill in blank
hard

Fix the error in the formula to remove duplicates from the range C2:C20.

Google Sheets
=UNIQUE([1])
Drag options to blanks, or click blank then click option'
AC2:C20
BC2-C20
CC2;C20
DC2:C2O
Attempts:
3 left
💡 Hint
Common Mistakes
Using a dash '-' instead of a colon ':'.
Using semicolons or misspelled cell references.
4fill in blank
hard

Fill both blanks to remove duplicates from the range D1:E15 and sort the results ascending.

Google Sheets
=SORT(UNIQUE([1]), [2], TRUE)
Drag options to blanks, or click blank then click option'
AD1:E15
B1
C2
DFALSE
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong range or column number.
Confusing TRUE/FALSE for ascending/descending.
5fill in blank
hard

Fill all three blanks to remove duplicates from A2:C20, sort by the second column descending, and display only the first 5 rows.

Google Sheets
=INDEX(SORT(UNIQUE([1]), [2], [3]), SEQUENCE(5))
Drag options to blanks, or click blank then click option'
AA2:C20
B2
CFALSE
DTRUE
Attempts:
3 left
💡 Hint
Common Mistakes
Using TRUE instead of FALSE for descending.
Not limiting rows with INDEX and SEQUENCE.

Practice

(1/5)
1. What does the UNIQUE(range) function do in Google Sheets?
easy
A. It highlights duplicate values in the range.
B. It sorts the values in the range alphabetically.
C. It counts how many times each value appears in the range.
D. It returns only the unique values from the given range, removing duplicates.

Solution

  1. Step 1: Understand the purpose of UNIQUE()

    The UNIQUE() function is designed to filter out repeated values and return only distinct entries from a range.
  2. Step 2: Compare options with UNIQUE() behavior

    'It returns only the unique values from the given range, removing duplicates.' correctly describes that UNIQUE() returns unique values by removing duplicates.
  3. Final Answer:

    It returns only the unique values from the given range, removing duplicates. -> Option D
  4. Quick Check:

    UNIQUE(range) = unique values [OK]
Hint: Remember: UNIQUE() filters duplicates, not sorting or counting [OK]
Common Mistakes:
  • Confusing UNIQUE() with SORT()
  • Thinking UNIQUE() counts duplicates
  • Assuming UNIQUE() highlights duplicates
2. Which of these is the correct syntax to remove duplicates from the range A1:A10 in Google Sheets?
easy
A. FILTER_DUPLICATES(A1:A10)
B. REMOVE_DUPLICATES(A1:A10)
C. UNIQUE(A1:A10)
D. DELETE_DUPLICATES(A1:A10)

Solution

  1. Step 1: Identify the correct function name

    Google Sheets uses UNIQUE() to remove duplicates, not any other function names.
  2. Step 2: Check the syntax format

    The correct syntax is UNIQUE(range), so UNIQUE(A1:A10) is valid and works as expected.
  3. Final Answer:

    UNIQUE(A1:A10) -> Option C
  4. Quick Check:

    Correct syntax = UNIQUE(range) [OK]
Hint: Use UNIQUE() exactly, no other function removes duplicates [OK]
Common Mistakes:
  • Using non-existent functions like REMOVE_DUPLICATES()
  • Adding extra parentheses or commas incorrectly
  • Confusing with FILTER() function
3. Given the data in cells A1:A6 as:
1
2
2
3
1
4
What will be the result of =UNIQUE(A1:A6)?
medium
A. [1, 2, 3, 4]
B. [1, 2, 2, 3, 1, 4]
C. [4, 3, 2, 1]
D. [1, 3, 4]

Solution

  1. Step 1: List unique values from the data

    The values are 1, 2, 2, 3, 1, 4. Unique values in order of first appearance are 1, 2, 3, 4.
  2. Step 2: Understand UNIQUE() output

    UNIQUE() returns these unique values as a vertical array: 1, 2, 3, 4.
  3. Final Answer:

    [1, 2, 3, 4] -> Option A
  4. Quick Check:

    UNIQUE removes duplicates, keeps first order [OK]
Hint: UNIQUE() keeps first occurrence, removes repeats [OK]
Common Mistakes:
  • Expecting sorted output instead of original order
  • Including duplicates in the result
  • Confusing UNIQUE() with SORT()
4. You wrote =UNIQUE(A1:A5, TRUE, FALSE, TRUE) but get an error. What is wrong?
medium
A. TRUE should be FALSE to remove duplicates.
B. UNIQUE() takes at most three arguments, extra TRUE causes error.
C. The range A1:A5 is invalid for UNIQUE().
D. UNIQUE() requires a second argument to work.

Solution

  1. Step 1: Check UNIQUE() function arguments

    UNIQUE() accepts one required argument (range) and up to two optional boolean arguments ([by_column], [exactly_once]). Adding a fourth TRUE is invalid syntax.
  2. Step 2: Understand error cause

    Passing more than three arguments causes a formula parse error in Google Sheets.
  3. Final Answer:

    UNIQUE() takes at most three arguments, extra TRUE causes error. -> Option B
  4. Quick Check:

    UNIQUE(range[, by_col][, exact]) only up to 3 args [OK]
Hint: UNIQUE() takes at most 3 arguments, no extras [OK]
Common Mistakes:
  • Adding extra arguments to UNIQUE()
  • Thinking TRUE/FALSE controls duplicate removal
  • Using invalid ranges
5. You have a table with columns A (Name) and B (City) from rows 1 to 8. Some rows have duplicate Name and City pairs. Which formula removes duplicate rows considering both columns together?
hard
A. UNIQUE(A1:B8)
B. UNIQUE(A1:A8)
C. UNIQUE(B1:B8)
D. UNIQUE(A1:B8, TRUE)

Solution

  1. Step 1: Understand removing duplicates by multiple columns

    To remove duplicates based on both Name and City, you must include both columns in the UNIQUE() range.
  2. Step 2: Check options for correct range

    UNIQUE(A1:B8) uses UNIQUE(A1:B8), which considers both columns together and removes duplicate rows correctly.
  3. Final Answer:

    UNIQUE(A1:B8) -> Option A
  4. Quick Check:

    UNIQUE(multi-column range) removes duplicate rows [OK]
Hint: Include all columns in UNIQUE() to remove full-row duplicates [OK]
Common Mistakes:
  • Using only one column range to remove multi-column duplicates
  • Adding extra arguments to UNIQUE()
  • Expecting UNIQUE() to sort automatically
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard