I want to import a range from another Google sheet, but to ignore empty cells so that the data prints back to back (versus having big gaps created from importing empty cells). Here is my formula (Google link changed for confidentiality):
=IMPORTRANGE("https://docs.google.com/spreadsheets/d/dalsfjasfdjjasfd/edit#gid=76574001",
"Course_Schedule!F2:F77")
Put another way, import range of about result would be: blank cell, blank cell, 25, 43, blank cell
When I want it to be: 25, 43
To ignore blank cells with functions operating on a criteria_range and a corresponding criterion is to write the condition "<>" in the criterion.
In the Home tab, click on Transform data. In Power Query Editor, select the query of the table with the blank rows and columns. In Home tab, click Remove Rows, then click Remove Blank Rows.
IMPORTRANGE is a simple function: just input the link to the spreadsheet and the range you want to import. It then places the data into the QUERY function. The last step is to finish the query. Input the query parameters, which dictate how the data will be manipulated and displayed.
=QUERY(IMPORTRANGE("1GVsBuYlJk2wxKgYjA2k_6ZlBoZ17frwyktfP6a0lUao",
"Course_Schedule!F2:F77"), "select Col1 where Col1 is not Null", 0)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With