Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ImportRange Function to Ignore Empty Cells

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

like image 851
Thomas Kauer Avatar asked Jan 10 '19 21:01

Thomas Kauer


People also ask

How do I get Google Sheets to ignore blank cells?

To ignore blank cells with functions operating on a criteria_range and a corresponding criterion is to write the condition "<>" in the criterion.

How do you remove Blank cells from a query?

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.

How do I use Importrange with conditions in Google Sheets?

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.


1 Answers

=QUERY(IMPORTRANGE("1GVsBuYlJk2wxKgYjA2k_6ZlBoZ17frwyktfP6a0lUao",
 "Course_Schedule!F2:F77"), "select Col1 where Col1 is not Null", 0)

4

like image 89
player0 Avatar answered Oct 06 '22 18:10

player0