Forum Discussion
eeftodie
Jul 19, 2022Copper Contributor
Excel Table - Sorting Information in Alphabetical Order With Subdata
I have a report I need to put in alphabetical order, but each title has subtasks beneath it. I want to put all the titles (names in bold) in alphabetical order, but I want the information that goes along with each title (construction drawings, design drawings etc.) to be locked so it is not put in alphabetical order. For example,
The names, trevor, cheryl, and kim are my titles that I want to be in alphabetical order.. but the rows beneath that are not bolded I need to keep with the name as this data is specific to the name of the person. It needs to somehow be grouped together (but the group function in my experience does not work for what I am trying to do).
How can I sort the names in alphabetical, but keep the below information in tact?
Is there some way that I can have the name drop down the information below, so it can be minimized and dropped down? The data also needs to stay with the columns to the right.
I have had 0 luck finding a way to do this. Please help! 🙂
This might work if you're open to using a formula solution:
=LET(order,SCAN("",names,LAMBDA(a,v,IF(XOR(v={"trevor","cheryl","kim"}),v,a))),SORTBY(data,order,1))
More names can be added as needed.
Please see attached workbook sample.
- Patrick2788Silver Contributor
This might work if you're open to using a formula solution:
=LET(order,SCAN("",names,LAMBDA(a,v,IF(XOR(v={"trevor","cheryl","kim"}),v,a))),SORTBY(data,order,1))
More names can be added as needed.
Please see attached workbook sample.- eeftodieCopper ContributorThank you so much for your help, I found an alternative way to sort the data!!!!! So happy
- sylviawhite08Copper ContributorCan you please let me know how you did this?? Im trying so hard to do something similar
- Patrick2788Silver ContributorIt's do-able. Other than the bold formatting, might there be anything else in the rows with trevor/cheryl/kim that might tell us those are title rows?