Forum Discussion

Marco365's avatar
Marco365
Brass Contributor
Jan 21, 2021
Solved

Sort Numbers Within A Cell In Excel?

Hi everyone,    I am just looking for a formula to sort numbers within a cell   042 = 024 or 420   3406 = 0346 or 6430    32 = 23 or 32        
  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    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.

Resources