
Originally Posted by
MrShorty
This sort of thing often turns out to be an unexpected character somewhere in the text string. I debugged by:
1) =LEN(C6) to see if Excel is seeing more characters than I can see. In this case, the result is the expected length.
2) With that, I check the code number for each character in the text string =CODE(MID(J6,ROW(C1),1)) [copy down to see all characters]. What I quickly notice is that the hyphen characters used for "negative" are code 173 hyphen characters and not the the usual code 45 hyphen character. Excel only recognizes 45 hyphen characters to indicate negative numbers, so Excel cannot convert these text strings to numbers.
A quick Find/Replace command (Find what? [alt-0173] Replace with? -) quickly replaces the offending hyphen character with the appropriate hyphen character, and Excel automatically converts the text to number.
Bookmarks