How to sort numbers with a space in the one cell

Copper Contributor

Hi - Have been searching online but can't find the correct formula. Is there a way to sort numbers in order i.e. lowest to highest within one excel cell as per below when there is a space between values? So in the cell below can you order the data as 1 4 6 24 35 45 52? Thanks for your help.

35 24 45 4 42 6 52 1
21 Replies
With permission from everyone, even if I still think that a file (without the syllable data) can present a clear picture for everyone, I now add a quick and easy solution.

Mark data (incl. Blank lines) - auto filter - do not show empty
then sort the same marking and then auto-filter off.
Without formula :)

Is just a thought, if it suits you I'll be happy. If it doesn't fit, just ignore it.

Nikolino

@Rajesh_Sinha

I am not quite sure what you hope to see from me.

Having tackled the problem as a challenge, I posted the resulting method as an antidote for the usual 'tips and tricks' genre, which would lead the reader to believing that single-cell filled formulas with relative referencing is the only way to develop spreadsheets.  I left posting until the OP had been given methods that would work with any version of Excel to avoid pressurising them into updating their software.

 

In case it is of interest to anyone, I have attached a copy of my workbook.  It is a macro-enabled workbook both because it contains the XLM4 function EVALUATE and it contains a macro that creates defined names and uploads formulae prepared on the worksheet.  Besides the main formula that relies on LAMBDA functions and LET, it also implements formulas that just rely on FILTER and SORT.  I could revert the functionality further, but my intention was to illustrate a possible future for Excel, not its past.