Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've few sheets where rows are populated dynamically via IMPORTXML and ImportJSON with the same columns, but they can't be sorted.

So I'd like to generate new sheet which will populate rows from other sheets, so consolidated rows can be sortable. Copying won't help when feed will change as main sheet won't be up-to-date.


I'd like to consolidate these 3 YouTube Data feeds from different countries:

=ImportJSON("http://gdata.youtube.com/feeds/api/standardfeeds/GB/most_popular?v=2&alt=json", "/feed/entry/title,/feed/entry/content/src", "noInherit,noTruncate,rawHeaders")
=ImportJSON("http://gdata.youtube.com/feeds/api/standardfeeds/US/most_popular?v=2&alt=json", "/feed/entry/title,/feed/entry/content/src", "noInherit,noTruncate,rawHeaders")
=ImportJSON("http://gdata.youtube.com/feeds/api/standardfeeds/AT/most_popular?v=2&alt=json", "/feed/entry/title,/feed/entry/content/src", "noInherit,noTruncate,rawHeaders")

into one sheet and sort them by title.

share|improve this question
You're on fire Kenorb !! – Jacob Jan Tuinstra Jan 28 '15 at 13:06
up vote 1 down vote accepted

Short Answer

Use arrays in Google Sheets and SORT() function.


To combine the non continuous ranges A1:D5, H1:K100, P1:S15, the following formula will return a 4 X 120 array sorted by the first column in ascending order.


The first parameter also could be any function that returns an array like IMPORTFEED.


  • The URLs provided in example are not working because the YouTube Data API (v2) has been officially deprecated as of March 4, 2014.
  • IMPORTJSON() was retired of the new Google Sheets.


share|improve this answer

Your Answer


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.