Query Importrange doesn't import every cell


I’m using Google Sheets and want to import every cell in Col16 where Col 3 is not empty to another sheet. So far so good and this is the formula which does exactly that:

=QUERY(IMPORTRANGE("https://docs.google.com/spreadsheets/XYZ";"XYZ!A2:BZ"); "SELECT Col16 WHERE Col3 IS NOT NULL"; 0)

The problem is that Col16 contains cells which start with a number and some cells which start with a letter. The cells with a letter are not imported and the cells stay empty.
Any idea how to fix that?

Looking forward to your help! Thank you

Tried to formate the cells to "Plain Text" in the source file but it doesn’t work.

>Solution :

To import all cells in Col16, including those that start with a letter, you can modify the query by using the Col header instead of "Col16".
Here’s the updated formula:
=QUERY(IMPORTRANGE("https://docs.google.com/spreadsheets/XYZ";"XYZ!A2:BZ"); "SELECT Col16 WHERE Col3 IS NOT NULL LABEL Col16 ”"; 0)
Note the addition of "LABEL Col16 ”" at the end of the query, which will force all cells in Col16 to be imported, even if they start with a letter.

Leave a Reply Cancel reply