SOLVED

Sort Numbers Within A Cell In Excel?

%3CLINGO-SUB%20id%3D%22lingo-sub-2080901%22%20slang%3D%22en-US%22%3ESort%20Numbers%20Within%20A%20Cell%20In%20Excel%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2080901%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20everyone%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20just%20looking%20for%20a%20formula%20to%20sort%20numbers%20within%20a%20cell%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E042%20%3D%20024%20or%20420%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E3406%20%3D%200346%20or%206430%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E32%20%3D%2023%20or%2032%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2080901%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2081023%22%20slang%3D%22en-US%22%3ERe%3A%20Sort%20Numbers%20Within%20A%20Cell%20In%20Excel%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2081023%22%20slang%3D%22en-US%22%3EPerhaps%20try%3A%3CBR%20%2F%3E%3Dtextjoin(%22%22%2Ctrue%2CSMALL(--MID(A1%2CROW(INDIRECT(%221%3A%22%26amp%3BLEN(A1)))%2C1)%2CROW(INDIRECT(%221%3A%22%26amp%3BLEN(A1)))))%3CBR%20%2F%3E%3CBR%20%2F%3EYou%20may%20need%20to%20hit%20Ctrl%2BShift%2BEnter%20for%20it%20work%20after%20keying%20it%20into%20the%20formula%20bar.%20For%20descending%20order%2C%20try%20replacing%20%22small%22%20with%20%22large%22.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2081026%22%20slang%3D%22en-US%22%3ERe%3A%20Sort%20Numbers%20Within%20A%20Cell%20In%20Excel%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2081026%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F540230%22%20target%3D%22_blank%22%3E%40Marco365%3C%2FA%3E%26nbsp%3BIf%20you%20are%20on%20a%20recent%20Excel%20version%2C%20perhaps%20like%20this%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202021-01-21%20at%2006.38.12.png%22%20style%3D%22width%3A%20510px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F247930i6BB8593EB16B1A1D%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot%202021-01-21%20at%2006.38.12.png%22%20alt%3D%22Screenshot%202021-01-21%20at%2006.38.12.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EWorkbook%20attached.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2085593%22%20slang%3D%22en-US%22%3ERe%3A%20Sort%20Numbers%20Within%20A%20Cell%20In%20Excel%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2085593%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F540230%22%20target%3D%22_blank%22%3E%40Marco365%3C%2FA%3E%26nbsp%3BSorry%2C%20but%20you%20need%20to%20be%20more%20specific.%20What%20I%20do%20get%20is%20that%2C%20for%20instance%20the%20number%20in%20E1%20%3D%20351.%20The%20largest%20number%20that%20can%20be%20created%20from%20these%20digits%20is%20531.%20Similar%20for%20E2%20and%20E3.%20The%20digits%20in%20the%20respective%20numbers%20can%20all%20be%20%22re-grouped%22%20to%20(the%20largest%20number)%20531.%20Now%2C%20E4%20(on%2018%20sep%202020)%20has%20the%20number%20131.%20How%20does%20this%20one%20relate%20to%20the%20531%20in%20J17%2C%20also%2018%20sep%202020%3F%20Similar%20for%20the%20next%20one%20(331%20on%2016%20sep).%20And%20why%20is%20there%20a%20number%20%22532%22%20in%20the%20list%20of%20531's%2C%20dated%2017%20sep%202020%3F%20(See%20picture).%20Perhaps%20you%20accidentally%20typed%20it%20wrong%20and%20it%20should%20also%20be%20531%20and%20on%2014%20sep%202020.%20But%20why%3F%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202021-01-22%20at%2005.51.18.png%22%20style%3D%22width%3A%20109px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F248465i6884792DC34B2175%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot%202021-01-22%20at%2005.51.18.png%22%20alt%3D%22Screenshot%202021-01-22%20at%2005.51.18.png%22%20%2F%3E%3C%2FSPAN%3E%26nbsp%3B%20%26nbsp%3B%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202021-01-22%20at%2005.38.36.png%22%20style%3D%22width%3A%20147px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F248464i6008F282EED7087D%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot%202021-01-22%20at%2005.38.36.png%22%20alt%3D%22Screenshot%202021-01-22%20at%2005.38.36.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EWhy%20not%20create%20an%20example%20of%2C%20say%2C%20the%20first%2010%20numbers%20on%20your%20list%20and%20manually%20produce%20the%20full%20output%20of%20what%20you%20need%2C%20noting%20down%20exactly%2C%20the%20logic%20for%20each%20step.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2090844%22%20slang%3D%22en-US%22%3ERe%3A%20Sort%20Numbers%20Within%20A%20Cell%20In%20Excel%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2090844%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F540230%22%20target%3D%22_blank%22%3E%40Marco365%3C%2FA%3E%26nbsp%3BAlways%20best%20to%20start%20one%20thread%20regarding%20one%20problem%20and%20not%20mix%20in%20other%20questions%20on%20the%20go.%20I%20noticed%20that%20you%20uploaded%20the%20same%20file%20and%20question%20at%20the%20end%20of%20the%20thread%20in%20the%20link%20below.%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fexcel%2Fassign-a-number-to-the-different-values%2Fm-p%2F1148488%22%20target%3D%22_self%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fexcel%2Fassign-a-number-to-the-different-values%2Fm-p%2F1148488%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBest%20for%20now%20is%20that%20you%20take%20some%20of%20your%20dates%20and%20numbers%20and%20%3CSTRONG%3Ecarefully%3C%2FSTRONG%3E%20produce%20the%20output%20you%20need%2C%20explaining%20the%20logic%20of%20every%20step%20needed%20to%20get%20there.%20What%20you%20have%20given%20so%20far%20is%20not%20clear%2C%20at%20least%20not%20to%20me.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2090983%22%20slang%3D%22en-US%22%3ERe%3A%20Sort%20Numbers%20Within%20A%20Cell%20In%20Excel%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2090983%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F540230%22%20target%3D%22_blank%22%3E%40Marco365%3C%2FA%3E%26nbsp%3BThanks%20for%20the%20file%20and%20clarification.%20Rather%20than%20creating%20a%20lot%20of%20manual%20steps%2C%20I%20thought%20it%20was%20best%20to%20create%20two%20pivot%20tables%20(%22pt%22).%20on%20the%20basis%20of%20the%20data%20sheet%20%221%20Sort%20by%20cell.....%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20first%20pt%20counts%20the%20number%20of%20numbers%20in%20each%20month%20of%20the%20year.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202021-01-24%20at%2008.50.13.png%22%20style%3D%22width%3A%20202px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F248977i11029B03CF39129A%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot%202021-01-24%20at%2008.50.13.png%22%20alt%3D%22Screenshot%202021-01-24%20at%2008.50.13.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EA%20second%20pt%20creates%20a%20list%20of%20all%20dates%20in%20the%20data%2C%20with%20a%20filter%20on%20the%20number%20with%20digits%20in%20descending%20order.%20I%20called%20it%20%22DescNr%22.%20This%20is%20the%20basis%20for%20individual%20pt's%20for%20each%20of%20these%20numbers.%20They%20look%20like%20this%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202021-01-24%20at%2008.53.36.png%22%20style%3D%22width%3A%20149px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F248978iB7E4E827A6EF7636%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot%202021-01-24%20at%2008.53.36.png%22%20alt%3D%22Screenshot%202021-01-24%20at%2008.53.36.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EDon't%20worry!%20You%20don't%20have%20to%20create%20every%20pt%20for%20each%20%22DescNr%22.%20Under%20options%20on%20the%20Pivot%20Table%20Analysis%20ribbon%2C%20you%20can%20select%20%22Show%20Report%20Filter%20Pages...%22.%20This%20will%20create%20one%20pt%20for%20each%20of%20the%20items%20in%20the%20filter%20field.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202021-01-24%20at%2008.36.24.png%22%20style%3D%22width%3A%20353px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F248979i7C08F48353C2D58E%2Fimage-dimensions%2F353x88%3Fv%3D1.0%22%20width%3D%22353%22%20height%3D%2288%22%20role%3D%22button%22%20title%3D%22Screenshot%202021-01-24%20at%2008.36.24.png%22%20alt%3D%22Screenshot%202021-01-24%20at%2008.36.24.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EPerhaps%20you%20find%20this%20approach%20acceptable.%20Almost%20fully%20automated%20and%20not%20much%20room%20for%20error.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2091781%22%20slang%3D%22en-US%22%3ERe%3A%20Sort%20Numbers%20Within%20A%20Cell%20In%20Excel%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2091781%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFirst%20of%20all%2C%20THANK%20YOU%20SO%20MUCH!%2C%20THANK%20YOU%2C%20THANK%20YOU%2C%20THANK%20YOU!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENow%2C%20I%20have%20some%20questions%2C%20did%20I%20miss%20the%20first%20step%3F%20I%20wanted%20to%20sort%20all%20the%20numbers%20by%20cell%2C%20so%20291%20and%20192%20can%20all%20become%20921%2C%20not%20combining%20them%20but%20just%20sort%20each%20one%20of%20them%20in%20the%20column%20but%20by%20cell.%20I%20would%20prefer%20from%20highest%20to%20lowest.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESecond%2C%20how%20can%20I%20also%20count%20how%20many%20days%20in%20the%20second%20pt%2C%20first%20instance%2C%20331%20has%205%20for%202020%20%26nbsp%3Band%207%20for%202019%2C%20is%20that%20clear%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Elast%20one%2C%20I%20know%20you%20use%20pt%2C%20would%20a%20video%20be%20possible%20at%20all%20to%20see%20the%20steps%20for%20this%20particular%20file%3F%20if%20not%20I'll%20just%20have%20to%20go%20find%20out%20how%20to%20use%20a%20pt%20and%20try%20it%20on%20my%20own.%20I%20would%20love%20to%20save%20that%20time%20and%20learn%20exactly%20what%20I%20need%20to%20learn%20right%20now%20from%20this%20file.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%2C%20thank%20you!%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2091814%22%20slang%3D%22en-US%22%3ERe%3A%20Sort%20Numbers%20Within%20A%20Cell%20In%20Excel%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2091814%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F540230%22%20target%3D%22_blank%22%3E%40Marco365%3C%2FA%3E%26nbsp%3BIn%20sheet%20%221%20Sort%20by......%22%20click%20the%20filter%20button%20and%20sort%20Descending.%20Is%20that%20what%20you%20mean%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHave%20added%20a%20field%20with%20sub-total%20to%20count%20the%20number%20of%20occurrences%20of%20every%20%22DescNr%22.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EA%20video%20is%20not%20something%20I'm%20able%20to%20create%20just%20now.%20Google%20for%20%22How%20to%20create%20a%20pivot%20table%22%20and%20you'll%20get%20many%20resources%2Ftutorials.%20Much%20better%20than%20what%20I%20can%20do.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAttaching%20a%20file%20with%20the%20changes%20described%20above.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2091887%22%20slang%3D%22en-US%22%3ERe%3A%20Sort%20Numbers%20Within%20A%20Cell%20In%20Excel%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2091887%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F540230%22%20target%3D%22_blank%22%3E%40Marco365%3C%2FA%3E%26nbsp%3BColumn%20F%20can%20be%20created%20by%20the%20formula%20I%20explained%20in%20my%20very%20first%20response.%20Isn't%20that%20one%20working%20for%20you%3F%20If%20not%2C%20what%20Excel%20version%20are%20you%20one%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

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

 

 

 

 

21 Replies

Perhaps try:
=textjoin("",true,SMALL(--MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1),ROW(INDIRECT("1:"&LEN(A1)))))

You may need to hit Ctrl+Shift+Enter for it work after keying it into the formula bar. For descending order, try replacing "small" with "large".

 

If you have office 365 and the newer functions (such as sort and sequence), then it could probably be made more efficient. This is a guess as to how you could try the sort function as I don't have that one, but someone else may be able to speak to whether or not it would work:

 

=textjoin("",true,sort(--MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)))

@Marco365 If you are on a recent Excel version, perhaps like this:

Screenshot 2021-01-21 at 06.38.12.png

Workbook attached.

@Riny_van_Eekelen 

 

Hi Riny,

 

I am not able to do it so far, I am not sure why. 

 

I have added more to what I am trying to get done in this file. Let me know if you can see it and if you can help, otherwise I would post the file to get some help.   Thank you so much 

@Marco365 Sorry, but you need to be more specific. What I do get is that, for instance the number in E1 = 351. The largest number that can be created from these digits is 531. Similar for E2 and E3. The digits in the respective numbers can all be "re-grouped" to (the largest number) 531. Now, E4 (on 18 sep 2020) has the number 131. How does this one relate to the 531 in J17, also 18 sep 2020? Similar for the next one (331 on 16 sep). And why is there a number "532" in the list of 531's, dated 17 sep 2020? (See picture). Perhaps you accidentally typed it wrong and it should also be 531 and on 14 sep 2020. But why?

Screenshot 2021-01-22 at 05.51.18.png   Screenshot 2021-01-22 at 05.38.36.png

Why not create an example of, say, the first 10 numbers on your list and manually produce the full output of what you need, noting down exactly, the logic for each step.

 

 

@Riny_van_Eekelen 

 

Hi Riny, so sorry for the confusion, that is what I was thinking of doing creating a brand new spreadsheet showing what I need to get done manually. I will work on it. Should I do a different post or use this one again? I am not too familiar with this platform, I don't want to have things all over the place. 

@Marco365 Always best to start one thread regarding one problem and not mix in other questions on the go. I noticed that you uploaded the same file and question at the end of the thread in the link below.

https://techcommunity.microsoft.com/t5/excel/assign-a-number-to-the-different-values/m-p/1148488 

 

Best for now is that you take some of your dates and numbers and carefully produce the output you need, explaining the logic of every step needed to get there. What you have given so far is not clear, at least not to me.

@Riny_van_Eekelen 

 

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  

Best Response confirmed by Marco365 (Occasional Contributor)
Solution

@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.

Screenshot 2021-01-24 at 08.50.13.png

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:

Screenshot 2021-01-24 at 08.53.36.png

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.

Screenshot 2021-01-24 at 08.36.24.png

Perhaps you find this approach acceptable. Almost fully automated and not much room for error.

@Riny_van_Eekelen 

 

 

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! 

@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.

@Riny_van_Eekelen 

 

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?

@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?

 

@Riny_van_Eekelen 

 

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

@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)))))

 

@JMB17 

 

Thank you, it works now. Thank you very much.

@Riny_van_Eekelen 

 

Thank you, I did go back and play with it and figured it out. It works. Thank you very much. 

@JMB17 

 

Hi again JMB17,

 

How can I tweak this formula to do the same thing for alphabets rather then numbers, for instance, ACBM can become ABCM or MCBA?

@Marco365 

 

Try:

=TEXTJOIN("",TRUE,CHAR(SMALL(CODE(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)),ROW(INDIRECT("1:"&LEN(A1))))))

 

And, you should be able to replace "small" with "large" to go in descending order. Also, I'm assuming the data does not mix upper/lower case?

@Marco365 , it shall work with texts