1
votes

I'm using a query function to copy over rows if it contains any text and/or numbers from column 12 (this column contains addresses). Column 12 has blank cells at times, so I would only like to copy over the entire row only if there's an address listed in this column. I've seen formulas where it's written to pick up on specific words, but not for a series of any numbers and letters in general.

Here's what I have so far:

=QUERY(QUERY('Zapier Tax Leads'!$A$2:$AQ$100000000,"SELECT A, B, C, D, E, F, G, H, I, J, K",1), "SELECT * WHERE Col12 contains "TEXT",1")

I'm getting a Formula parse error. which I am assuming it's coming from the "SELECT * WHERE Col12 contains "TEXT" part.
Any suggestions?

1
Please share a test sheet so as you can be easier helped. - marikamitsos
Just added the google sheet link above, the formula is in A2 under "MASTER" tab - Kristan Servidad
First of all your formula has double quotes ("") instead of single ones (''). So it should be 'TEXT'. Also, what do you mean by 'TEXT'? Do you probably mean that the cells contain some text?. In other words are not empty? - marikamitsos
Yes, you are correct, as long as the cell is not empty we want to copy over the entire row. Thank you! - Kristan Servidad
Then you can use the provided answer. And don't forget to accept it as well :) - marikamitsos

1 Answers

2
votes

EDIT (following OP's comment)

Can we add to this function and use other columns? i.e. "WHERE L & A & B is not null"

Yes you can.
Pay attention to the syntax though.
WHERE L is not null and A is not null and B is not null
Meaning, you have to use is not null for each column you wish to use it for.

Please read more about the where clause


What you (probably) need is the following formula

=QUERY('Zapier Tax Leads'!A2:Z,"SELECT A, B, C, D, E, F, G, H, I, J, K WHERE L is not null",1)

WHERE L is not null means that the query will only bring rows when there is some value in rows in column L.
In other words, it will bring rows that are NOT empty.

(Please adjust ranges to your needs.)