Google Sheets UNIQUE: ignore blanks, sort, combine columns
To make UNIQUE ignore blank cells, filter them out first: UNIQUE(FILTER(A2:A, A2:A<>"")). Wrap it in SORT, or use TOCOL(A2:B, 1) for two columns.
On this page
=UNIQUE(A2:A)Before as you see it
| A | D | |
|---|---|---|
| 1 | Saturday | Saturday names |
| 2 | Emily | Emily |
| 3 | Jacob | Jacob |
| 4 | Sarah | Sarah |
| 5 | ||
| 6 | Megan | Megan |
| 7 | Emily | Ryan |
| 8 | Ryan | Tyler |
What changed
- FILTER drops empty cells
- SORT puts the names A to Z
After =SORT(UNIQUE(FILTER(A2:A, A2:A<>"")))
| A | D | |
|---|---|---|
| 1 | Saturday | Saturday names |
| 2 | Emily | Emily |
| 3 | Jacob | Jacob |
| 4 | Sarah | Megan |
| 5 | Ryan | |
| 6 | Megan | Sarah |
| 7 | Emily | Tyler |
| 8 | Ryan |
UNIQUE has no setting that ignores blank cells, so take the empty cells out with FILTER before UNIQUE sees them. On the Fixed tab, =SORT(UNIQUE(FILTER(A2:A, A2:A<>""))) turns a volunteer roster with gaps into Emily, Jacob, Megan, Ryan, Sarah, Tyler: one list, sorted A to Z, with no empty line in it. Without the outer SORT, =UNIQUE(FILTER(A2:A, A2:A<>"")) only loses the gap and keeps the sign-up order. For names from the Saturday and Sunday columns together, TOCOL stacks both columns into one and skips the blanks first, and =SORT(UNIQUE(TOCOL(A2:B, 1))) returned eight names.
To use either formula elsewhere, A2:A is the column to list. It appears twice inside FILTER, so change both. In the TOCOL version, A2:B is the block of columns to combine.
Why does UNIQUE leave a blank row in the middle of the list?
Because the range includes an empty cell, A5 on this roster, and UNIQUE counts an empty cell as one more value. On the Broken tab, =UNIQUE(A2:A) returns Emily, Jacob, Sarah, then nothing in D5, then Megan, Ryan, Tyler. The gap sits between Sarah and Megan, the same spot where the Saturday column has its gap.
UNIQUE lists each value once, in the order it first turns up. The range A2:A runs past the end of the roster into every empty row of the sheet, and the first empty cell it meets is A5, so the blank comes fourth. A11 and all the empty rows under the roster are the same empty value, which is why the result has one gap and not dozens. Google's UNIQUE help page lists three arguments, the range, by_column and exactly_once, and none of them skips blanks, so the empty cells have to be removed before UNIQUE runs.
D2 on the Fixed tab does that with FILTER. The condition A2:A<>"" keeps only cells that are not equal to an empty string. UNIQUE then sees eight names, with Emily and Sarah each in there twice, and returns six.

Sorting the UNIQUE list A to Z or Z to A
Wrap the whole formula in SORT. With a one-column list, SORT(...) needs nothing else and sorts A to Z, which is what the Fixed tab does in column D. The SORT help page gives the full form as SORT(range, sort_column, is_ascending), and FALSE in the is_ascending spot sorts in descending order. The More causes tab has a Z to A sort in K2. It is built on the TRIM formula, so it comes right after that formula further down.
How do I get one UNIQUE list from two columns?
Stack the columns into one with TOCOL first, then run UNIQUE: =SORT(UNIQUE(TOCOL(A2:B, 1))) in F2 on the Fixed tab returned Emily, Jacob, Lauren, Megan, Olivia, Ryan, Sarah, Tyler. Lauren and Olivia only signed up for Sunday, and both made it into the list.
Widening the range alone gives something else. =UNIQUE(A2:B) on the Broken tab spills across F and G and returns whole rows: Emily with Jacob, Jacob with Megan, Sarah with an empty Sunday cell, and so on. UNIQUE compares the cells of each row together, so a row only counts as a repeat when both names match another row. Emily appears twice in column F, at F2 and F7, because she was paired with Jacob once and with Olivia once.
TOCOL turns a block of cells into a single column. Its second argument decides what to leave out, and Google lists 1 as the value that ignores blanks, so the empty cells in A2:B11 and the rows below the roster never reach UNIQUE. The same help page says TOCOL reads row by row unless its third argument, scan_by_column, is TRUE. With SORT on the outside, the reading order makes no difference to the result. Both arguments, along with FLATTEN and WRAPROWS, are worked through in the post on turning a table into one column.
H2 on the Fixed tab holds =COUNTUNIQUE(A2:B) and returned 8, the same count as the list in column F. On a roster too long to read by eye, the count and the length of the list are a check on each other.

The Try it yourself tab starts out with the same gap in column D and the same pairs in F and G. Select D2, press Delete, and type =SORT(UNIQUE(FILTER(A2:A, A2:A<>""))). Do the same in F2 with =SORT(UNIQUE(TOCOL(A2:B, 1))). Columns D and F should then match the Fixed tab, and the pairs in column G go away once F2 holds the new formula.
Removing the blank-looking cell that FILTER with <>"" lets through
The cell is not empty. It holds a space, and a space is not equal to an empty string, so the <>"" test keeps it. The More causes tab shows this with a shorter column A: Emily, emily, Emily with a space after it, a cell with only a space, Jacob, an empty cell, Jacob again, and Ashley.
C2 runs the Fixed tab's FILTER and UNIQUE without the SORT, and C5 comes out looking empty. =LEN(A5) returned 1, one character. The same result has Emily at C2 and again at C4, and the second one is the copy with the trailing space, which UNIQUE treats as a different name. The UNIQUE help page warns about this too: text with hidden differences such as trailing spaces can look like a duplicate when it isn't one.
Trimming before the test handles both. In E2 on the same tab:
=UNIQUE(FILTER(TRIM(A2:A), LEN(TRIM(A2:A))))
TRIM removes the space at the end of "Emily " and turns the lone space into an empty string. LEN of an empty string is 0, FILTER treats 0 as false, and that row drops out. E2:E5 returned Emily, emily, Jacob, Ashley. The names in the result are the trimmed versions, since the list is built from TRIM(A2:A).

The same tab sorts that trimmed list Z to A in K2:
=SORT(UNIQUE(FILTER(TRIM(A2:A), LEN(TRIM(A2:A)))), 1, FALSE)
The 1 is the column to sort by, the only column in this result, and FALSE asks for descending order. K2:K5 returned Jacob, Emily, emily, Ashley. The capitalized Emily landed ahead of the lowercase one in that descending sort, and the two are still separate entries.
Why does UNIQUE list the same name twice when the capitals differ?
UNIQUE compared Emily and emily as different text in this sheet, so the capitals need to match before the comparison. G2 on the More causes tab wraps the trimmed names in PROPER:
=UNIQUE(FILTER(PROPER(TRIM(A2:A)), LEN(TRIM(A2:A))))
G2:G4 returned Emily, Jacob, Ashley. PROPER capitalizes the first letter of each word and lowercases the rest, so emily became Emily before UNIQUE looked at it. The condition stays as LEN(TRIM(A2:A)), because its only job is to throw out cells with nothing in them.
Can UNIQUE return only the names that appear once?
Yes, with the third argument. The UNIQUE help page describes exactly_once as returning only entries that have no duplicates. I2 holds =UNIQUE(FILTER(A2:A, A2:A<>""), FALSE, TRUE). The middle FALSE is by_column, left at its default so the comparison runs down the rows.
It returned Emily, emily, Emily with the trailing space, the lone space, and Ashley. Jacob is missing because A6 and A8 both say Jacob. Apart from Ashley, the list is a side effect of the plain <>"" filter: the three spellings of Emily in I2:I4 each count as appearing once, and the space takes up I5.
For a list you can rely on, clean the names before UNIQUE counts them. Put the FILTER from G2, the one with PROPER, TRIM and LEN, where the plain FILTER is, and keep FALSE, TRUE after it. G2:G4 shows what that cleanup does to this column: the three spellings of Emily become one name and the lone space is gone, so neither can pass as a one-time entry.
| Input | Saturday names in A2:A11, with empty cells at A5 and A11 |
|---|---|
| Formula | =SORT(UNIQUE(FILTER(A2:A, A2:A<>""))) |
| Expected | Emily, Jacob, Megan, Ryan, Sarah, Tyler |
| Sheets returned | Emily, Jacob, Megan, Ryan, Sarah, Tyler Matches expected |
| Checked | 2026-11-11, free personal account |
Take-home copy. Four tabs: Broken (as you see it), Fixed, Try it yourself, More causes. It opens as a copy in your own Drive.