Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Sheets - Ignore empty cells (JOIN & QUERY)

I'm pretty new to googlesheets and I have a set of data that will update based on input from others and I wanted to filter data based on two matched values.

=JOIN(", ",QUERY('Form responses 1'!$D$2:$E,"SELECT D WHERE E = '"&$A$2:$A&"'"))

I have this formula and this works for my needs however it also returns a bunch of commas when there are numerous blank cells. What can I do to get it to the ignore blank cells?

like image 600
RibbitBibbit Avatar asked Apr 18 '26 03:04

RibbitBibbit


1 Answers

Try TEXTJOIN with the second parameter (ignore_empty) TRUE

Syntax: TEXTJOIN(delimiter, ignore_empty, text1, [text2, ...])

Sample Usage:

TEXTJOIN(“ “, TRUE, “hello”, “world”)
TEXTJOIN(“, ”, FALSE, A1:A5)
like image 57
pnuts Avatar answered Apr 24 '26 19:04

pnuts



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!