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.

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.


Example:

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
1  
You're on fire Kenorb !! –  Jacob Jan Tuinstra Jan 28 at 13:06

1 Answer 1

up vote 1 down vote accepted

Short Answer

Use arrays in Google Sheets and SORT() function.

Example

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.

=SORT({A1:D5;H1:K100;P1:S15},1,TRUE)

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

Remarks

  • 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.

References

share|improve this answer

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.