Forum Discussion
YYHoe
Jul 06, 2022Copper Contributor
Sorting out and counting text strings in a table
I have attached a table extracted from a power query. I want to turn it (B2:H21) into a first column listing down unique strings in alphabetical order (ignoring nul cells) and a second column showing the count any strings that are replicates. Any simple and elegant trick from Excel experts here?
YYHoe That would involve unpivotting the data, clean-up a bit and then group (and count) and sort. An example is included in the attached file. I couldn't continue with your query as it connect to an source that was not in the workbook. But I created a new (stand-alone) table from the one in Sheet1 and connected PQ to that one. The end result is in sheet PQ.
- Riny_van_EekelenPlatinum Contributor
YYHoe That would involve unpivotting the data, clean-up a bit and then group (and count) and sort. An example is included in the attached file. I couldn't continue with your query as it connect to an source that was not in the workbook. But I created a new (stand-alone) table from the one in Sheet1 and connected PQ to that one. The end result is in sheet PQ.
- YYHoeCopper ContributorThank you very much, Riny. Spot on!!!