By: NK

Why not use the FILTER function? Perhaps combined with the UNIQUE function?

=UNIQUE(FILTER(B5:B14,B5:B14″”))