8

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

player0
  • 124,011
  • 12
  • 67
  • 124
Thomas Kauer
  • 81
  • 1
  • 1
  • 3
  • 1
    Possible duplicate of [Import Range from spreadsheet but exclude rows with missing data](https://stackoverflow.com/questions/31868144/import-range-from-spreadsheet-but-exclude-rows-with-missing-data) – Tedinoz Jan 10 '19 at 23:58

2 Answers2

10

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

4

player0
  • 124,011
  • 12
  • 67
  • 124
-1

This might help:

=filter(IMPORTRANGE("https://docs.google.com/spreadsheets/d/dalsfjasfdjjasfd/edit#gid=76574001", "Course_Schedule!F2:F77"), IMPORTRANGE("https://docs.google.com/spreadsheets/d/dalsfjasfdjjasfd/edit#gid=76574001", "Course_Schedule!F2:F77")<>"") 

The filter in this formula would set the criteria to ignore blank cell (<>""), therefore, allowing you to get your desired results