Forum Discussion
Sort Numbers Within A Cell In Excel?
- Jan 24, 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.
I am sure it is kind of confusing, I thought so myself. I have attached another spreadsheet with 3 sheets with instruction in the sheet or see the sheet title. Let me know if that is clear and is possible to achieve. Thanks
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.
- 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 25, 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)))))
- Marco365Jan 24, 2021Brass Contributor
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
- Riny_van_EekelenJan 24, 2021Platinum Contributor
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?
- Marco365Jan 24, 2021Brass Contributor
I started looking at tutorial, I will go ahead and learn more about it because I need it. But I would like your help with just one more thing. I feel like I am missing it, but let me clarify again, in sheet "1Sort by cell..." I had to take column E and manually create column F, meaning each cell in column E I had to manually create another cell for it in column F by just typing it. Column E for instance had in each cell these numbers 531, 513, 135, 153, 315, 353 but I had to manually turn all of them in column F to 531, 531, 531, 531, 531, 531. How can I sort each cell from highest to lowest so all become 531 automatically? is that clear?
- Riny_van_EekelenJan 24, 2021Platinum Contributor
Marco365 In sheet "1 Sort by......" click the filter button and sort Descending. Is that what you mean?
Have added a field with sub-total to count the number of occurrences of every "DescNr".
A video is not something I'm able to create just now. Google for "How to create a pivot table" and you'll get many resources/tutorials. Much better than what I can do.
Attaching a file with the changes described above.
- Marco365Jan 24, 2021Brass Contributor
First of all, THANK YOU SO MUCH!, THANK YOU, THANK YOU, THANK YOU!
Now, I have some questions, did I miss the first step? I wanted to sort all the numbers by cell, so 291 and 192 can all become 921, not combining them but just sort each one of them in the column but by cell. I would prefer from highest to lowest.
Second, how can I also count how many days in the second pt, first instance, 331 has 5 for 2020 and 7 for 2019, is that clear?
last one, I know you use pt, would a video be possible at all to see the steps for this particular file? if not I'll just have to go find out how to use a pt and try it on my own. I would love to save that time and learn exactly what I need to learn right now from this file.
Thank you, thank you!