Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading