Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9831

Indexing a list of songs with Google Sheet query

$
0
0

I have a big list of songs in Google Sheets which looks a little bit like this:

Number of SongBeginning of SongTitle of SongAlternate Title of Song
A1Should old AcquaintanceAuld Lang Syne
A2Old MacDonald had a farm
A3Hark when the nightScotland the Brave
B54Should old Acquaintance

What I want to do is to do an alphabetically ordered index of this with the following columns:

Beginning or Title of SongNumber of Song
Auld Lang SyneA1
Hark when the nightA3
......
Should old AcquaintanceA1, B54

So what I did was this function for the first column:

=query(flatten(Songs!B2:D1004); "where Col1 is not null order by Col1 asc")

And for the second column a not so elegant:

=iferror(iferror(index(songs!A:A;compare(A4; songs!B:B;0));iferror(index(songs!A:A;compare(A4; songs!C:C;0));index(songs!A:A;compare(A4; songs!D:D;0)))))

What I am wondering:

  • Is there a better way for column 2?
  • How can I implement the fact that there could be two numbers for one song?

I would be very happy to know an answer!


Viewing all articles
Browse latest Browse all 9831

Latest Images

Trending Articles



Latest Images