Spreadsheets get unique names but ignore blank cells

DIzZy picture DIzZy · Oct 17, 2017 · Viewed 32.6k times · Source

I would like to use spreadsheets to get all unique names from Column A in a table but in the same time I would like blank cells to be ignored. So far I've got this formula that returns all of the unique names from column A but I don't know how to go about ignoring blank cells and not repeating values that have once been added previously.

Here is how my document looks so far. As you can see everything stops after Megan because there is a blank cell.

=IFERROR(INDEX($A$2:$A$90, MATCH(0, COUNTIF($I$10:I10, $A$2:$A$90), 0)), "")

Searched long and wide but came up with nothing, if anyone has any idea how one could do that I would really appreciate it. Thanks!

Answer

Max Makhrov picture Max Makhrov · Oct 17, 2017

=unique(A2:A) should work

=unique(filter(A2:A,A2:A<>"")) to also ignore blanks