Forum Discussion
Sort Numbers Within A Cell In Excel?
- Jan 23, 2021
Marco365 Thanks for the file and clarification. Rather than creating a lot of manual steps, I thought it was best to create two pivot tables ("pt"). on the basis of the data sheet "1 Sort by cell....."
The first pt counts the number of numbers in each month of the year.
A second pt creates a list of all dates in the data, with a filter on the number with digits in descending order. I called it "DescNr". This is the basis for individual pt's for each of these numbers. They look like this:
Don't worry! You don't have to create every pt for each "DescNr". Under options on the Pivot Table Analysis ribbon, you can select "Show Report Filter Pages...". This will create one pt for each of the items in the filter field.
Perhaps you find this approach acceptable. Almost fully automated and not much room for error.
Marco365 Column F can be created by the formula I explained in my very first response. Isn't that one working for you? If not, what Excel version are you one?
I have 2019, I did try but didn't work. It could be me. I am sorry. Perhaps you can give me another chance by trying it in the file I sent? Thanks
- Marco365Jan 26, 2021Brass Contributor
Thank you, I did go back and play with it and figured it out. It works. Thank you very much.
- Riny_van_EekelenJan 24, 2021Platinum Contributor
Marco365 Okay. Then you can use the formula that was provided by JMB17 above. It works pretty much the same as mine and should work in E2019. Just read his post for more instructions.
=TEXTJOIN("",TRUE,LARGE(--MID(E2,ROW(INDIRECT("1:"&LEN(E2))),1),ROW(INDIRECT("1:"&LEN(E2)))))