Google Sheets – Array Formula with N/A to Print Nicely When Empty

google sheetsgoogle-sheets-arrayformulaprinting

We use a rather long formula something like:

=ArrayFormula(JOIN(", ",UNIQUE(FILTER(SOURCERANGE!A1:A99999,SOURCERANGE!N1:N99999=A2  ))))

Some cells in our table gave results and they print nicely.

But some cells do NOT have results. And they print as #N/A

I have never quite liked the #N/A and would rather show an empty cell or a dash.

The only solution so far that I have found is to add an ISERRROR() or ISNA() formula around it, but then this feels silly because the initial formula is executed twice.

Question: is there an easy way to tell sheets to print "" instead of #N/A?

Thanks

Best Answer

You can wrap your formula with the IFERROR function instead:

=IFERROR(ArrayFormula(JOIN(", ",UNIQUE(FILTER(SOURCERANGE!A1:A99999,SOURCERANGE!N1:N99999=A2)))),"")

You could also try the IFNA function.