Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

Regarding Google spreadsheets, document 1 has many rows of data. How do I import into document 2 only those rows that have a certain value in column C?

share|improve this question

1 Answer 1

Basics:

This is not as straight forward as a normal import using the IMPORT function. With this function, you are able to perform imports only:

=IMPORTRANGE("key","range")

Adding a function, like SUM or FILTER, within the "range" string will result in an error. The solution must be found, by using the QUERY function:

=QUERY(IMPORTRANGE("key","range"),"SELECT * WHERE Col1='value'")

OR

=QUERY(IMPORTRANGE("key","A:Z"),"SELECT * WHERE Col1 contains 'value'")

NOTE:

After WHERE, Column definition must be as first letter upper-case then lower case. Col will work, COL or col will not.

Ordering:

Once imported you can order the results by using the ORDER BY clause:

=QUERY(IMPORTRANGE("key","A:Z"),"SELECT * WHERE Col1 contains 'value' ORDER BY Col1")

Select columns:

So the IMPORTRANGE function cannot do selected columns, it can only do one range block. The way around this is to use the QUERY function SELECT clause:

=QUERY(IMPORTRANGE("key","A:Z"),"SELECT Col1, Col2, Col3 WHERE Col1 contains 'value' ORDER BY Col1")

References:

share|improve this answer
    
Thank you so much! :) –  user2338585 May 9 '13 at 17:12
    
@user2338585 Please mark the answer, so that future visitors will notice !! Good luck. –  Jacob Jan Tuinstra May 9 '13 at 17:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.