Forum Discussion
Group Column Data, With Values (Bypassing Blanks)
For an eventual home in a SharePoint List and in turn, a PowerApp, I'm looking to combine the contents of potentially many columns (maybe hundreds of potentials) with only a few having values.
Given the fact that I'm not sure how many columns I may stick the formula/code in to the 300th column (assuming the number of columns caps well under 300). I'm less concerned about exactly where as I can copy and paste code in to whatever column. I'm just clueless on the actual formula/macro.
From there, I would import the excel to a SharePoint List and eventually pull data from a dropdown in a PowerApp.
I've attached a file for reference.
Any insight would be appreciated.
1 Reply
- Patrick2788Silver Contributor
This will do it. I prefer using named items for readability and not the long structured table references:
=LET( swap, IF(Counts, Header & " (" & Counts & ")", ""), joined, BYROW(swap, LAMBDA(v, TEXTJOIN(", ", 1, v))), joined )