2

(Link to Test Spreadsheet)

I am working on a spreadsheet that has a list of people, and for each person, they have ten choices that correspond to adjacent columns with artist and song name. The data set to choose from is 1014 songs.

I am trying to import their choices from another sheet using the IMPORTRANGE function as an input to the QUERY function that will list the items in range of descending count of appearance, basically listing the top 10 most popular songs from everybody in the list. For those who think they know what I am doing, it is capturing family votes for the Triple J Hottest 100 of 2022, and ranking the top 10 songs voted for by my family.

The test spreadsheet has the data set up where the query works when I set a data source in QUERY to be cell references, but when I try using IMPORTRANGE to provide the data, it doesn't recognise or allow a reference to any column.

Has anyone had any luck doing this in one function, or do I have to import and reference local cells in two operations?

1 Answer 1

0

Simply change the selection to:

"SELECT Col2, COUNT(Col2) WHERE (Col2 <> 'Song') GROUP BY Col2 ORDER BY COUNT(Col2) DESC LIMIT 10"

1
  • This worked, thank you. I am a little embarrassed that it was that easy. Jan 1, 2023 at 8:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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