Why not another point?
Excel has a way of handling this without the question of converting and formatting and how these aren't necessarily the same thing and how other characters (as mentioned: thank you internet) might interfere. Mind you, it won't fix the latter, but if it fails, then you KNOW it's the latter so troubleshooting moves on to where it will work, not to dead ends.
When sorting, and this kind of thing arises, Excel offers an opportunity for your sort to treat text that looks like numbers AS numbers. Or not to do so. If you choose the former, your sort will work as desired when it is a matter of numerical characters that Excel is (still) treating as text characters.
As to the misunderstandings some show above, reformatting text formatted cells as some numerical format, so "numerical" instead does not always (OFTEN does not always) actually do the "conversion"... Yes, the formatting is changed. No, Excel is still not looking at them as numbers. Forcing the actual change in how Excel regards them is a mild form of something Excel folks call COERCING
. Some of the ways you can do that are mentioned above: actually edit each cell (not making a typed change, just entering Edit mode with, say F2, or your mouse) and pressing Enter will do it, using Paste|Special|Multiply
multiplying by 1 or the P|S|Add
version adding 0 (though that has pitfalls if the content really is "text"), using Text to Columns
... all of these are meant to coerce the format to be recognized by Excel. All should work, nicely, and if they don't, then the reason is almost certainly that there are non-visible, or barely visible and so not noticed, characters between one or more pairs of digits. Website material is notorious for this. Excel has a (primitive) help for that, the CLEAN()
function, and the internet offers various (short and old and kinda poor) lists of other characters, ones CLEAN()
does not know about, that one can hunt for. All may be just what you needed, but usually, not completely.
Nowadays (2021) with SPILL
functionality, we can do things like test each character in a cell, keep it if numerical (of course, problematic for decimal characters, negative markers, and so on... but still...), drop it if not, and make a string of the keepers, then convert it with VALUE()
. Works for almost anything, and since the characters that cause problems are NOT in the series of characters that include decimal markers and numbers, one can just check against a list including them and a few others (that don't matter so don't cause a problem) and only end up foiled by text like [28.335_]-
(weird formats from when they were text formatted, and hence may still (may not) remain after reformatting and trying the coercion methods.
Anyhow, just an answer trying to show what of the previous ones was related and how they relate to the overall issue. Everyone here seemed to be part of one of those "10 blind men describe an elephant (whilst a joker actually switched in a gorilla before they started)" stories. Solving the problem one has when this symptom jumps you requires knowing the whole sitch so one can go down some workable path, not the many paths that are not precisely wrong, but still lead to no solution at all. Like reading a medical book, a page here, a page there, then trying to fix someone's flu by setting his leg.