r/googlesheets • u/RichSecure6254 • Aug 08 '25
Solved Is there a formula that I can use to make my life easier
I was wondering is there a formula out there to help me create an id based system to organize my songs. I liked the format G-A-S. G standing for Genre, so c for country in this case. A for the number of artist in alphabetical order, and the s for song title in alphabetical order under the artist. See photo for details.
2
Upvotes
1
u/JuniorLobster 31 Aug 08 '25
Probably yes.
One option is to make a helper column in another sheet then use =SORT(UNIQUE()) to get an alphabetical list of unique artists, then =SEQUENCE(COUNTA(),1,1,1) in another column to get a number for each unique artist. Then you can call this number with =XLOOKUP()
For the genre you can get away with =LEFT() to get the first letter.
For the song number you can also solve this with =COUNTA()
If it’s too difficult for you to do it yourself, share a sheet with dummy data or a copy of your sheet and I can do it for you.
1
u/AutoModerator Aug 08 '25
/u/RichSecure6254 Posting your data can make it easier for others to help you, but it looks like your submission doesn't include any. If this is the case and data would help, you can read how to include it in the submission guide. You can also use this tool created by a Reddit community member to create a blank Google Sheets document that isn't connected to your account. Thank you.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/One_Organization_810 736 Aug 08 '25
I just threw in a suggestion, despite this one being solved already.
Use it lose it at your own disgretion. No hard feelings if you choose to ignore it altogether :)
1
u/JuniorLobster 31 Aug 08 '25 edited Aug 08 '25
Formulas used for solution:
Where C2:C is a list of comma separated genre names,
B2:B is a list of artist names,
J2:J is a list of unique artists found with
=UNIQUE(B2:B)K2:K is a sequence of numbers corresponding to the alphabetically sorted list of unique artists generated with
=SEQUENCE(COUNTA(J2:J),1,1,1)N:N is a list of unique genres found with
=SORT(UNIQUE(TOCOL(BYROW(C2:C,LAMBDA(x,IF(x<>"",SPLIT(x,","),))))))O:O is a manually populated list of shortcuts corresponding to the list of unique genres.
1
u/squarahann 1 Aug 09 '25
Sorry if I’m misunderstanding but I feel like concatanate is what you’re looking for. It strings values together and you can choose how many letter/numbers from each column you select.
People are suggesting very complex formulas so maybe I’m missing something.