The DU Lounge
Related: Culture Forums, Support ForumsExcel questions - deleting trailing spaces
I have a column of several hundred numbers. Some are two digit, some three, some four. However, they all seem to have trailing spaces after the numbers, so I can't add, subtract, divide, etc by the numbers and they all have trailing spaces.
I've tried (TRIM) and (CLEAN) functions, but neither worked. Normally, I would do (LEFT, 3) if every number was 3 digits, but I can't do that with numbers that are 2, 3 or 4 digits.
I also tried VALUE(C1) as well, and it didn't work.
A guide online mentioned using TRIM, SUBSTITUTE and CHAR, but that didn't work, either.
I've done similar a thousand times before over the years, but it's just not working this time. I think I'm using Excel 2007.
Thanks
Xyzse
(8,217 posts)You have a column which are only numbers but have trailing spaces that you don't know what they are.
My suggestion, if you have data you want to preserve to its right, copy that column and put it at the right end.
Then, depending on which Excel you have, it is in the Data Tab. It is called "Text to Columns".
With that column highlighted, hit "Text to Columns" which is a three step process.
First step is to decide if you want it delimited or fixed width. Pick Delimited.
Second step, use whatever you think needs to be delimited, usually it is "space".
If the extra spaces are on the right of the numbers, you should be fine pretty quick. Otherwise, it would put all the numbers in different columns which you would have to manually place back to one.
Another possible solution is to copy that whole column, paste it on another column blank column, using the right click function and say "Paste Special" = Values Only. Then it will probably post it as the numbers without the space.
Good luck!
NewJeffCT
(56,828 posts)neither seems to work.
Xyzse
(8,217 posts)I can give you an email address, for me to play with it.
NewJeffCT
(56,828 posts)I've converted text to numbers and vice versa a thousand times before. Not sure why it's not working this time.
Quite curious about this.
Oh! I edited it, and it is done. Check out if it is ok.
There is a hidden character at the end which I think might be a carriage return. It is now gone.
I'll check it out. how did you delete the hidden character(s)?
Oh, I used that "Delimited" function I was talking about, but I went to one of those cells, copied the extra space, so that I get whatever hidden character that is, and placed it in "Other".
It got kicked out of there. It was pretty awesome.
NewJeffCT
(56,828 posts)get sent back to you? I haven't received yet?
Xyzse
(8,217 posts)My name is weird, so it could probably have gone there.
Sent it with another email too.
just got it.
Thanks again!
Hope it works.
It seems to be working for me.
your sheet is working for me. However, how do I recreate it.
I tried text to columns>delimited>space but nothing happened?
Xyzse
(8,217 posts)However, go to one of the cells and go to the formula bar, copy the blank space there which is the hidden character.
Then put it in delimited "Other", and paste the copied hidden character there.
That should do it.
Response to NewJeffCT (Reply #7)
Xyzse This message was self-deleted by its author.
BlueStreak
(8,377 posts)If you want to use those contents in a calculation, you can convert from text to numbers by enclosing the cell reference with the VALUE function.
http://spreadsheets.about.com/od/excelfunctions/qt/81206_value.htm
In LibreOffice, there is a plug-in that will convert all of those text cells to be real number (or date) cells so you can operate on them normally. I don't know if there isa plug-in like that for Excel.
NewJeffCT
(56,828 posts)already tried Value(c20) as well. It gave me #VALUE!
BlueStreak
(8,377 posts)Or perhaps =VALUE(TRIM(....cell ref...))
Response to NewJeffCT (Original post)
lastlib This message was self-deleted by its author.
DrDan
(20,411 posts)then do an "edit - replace" putting a space in the first box and nothing in the second
the hit the "replace all"
this will get rid of all spaces in the column
Response to NewJeffCT (Original post)
Name removed Message auto-removed
jmowreader
(50,553 posts)And this is a single column of numbers? With no spaces in the numbers themselves?
Export to ASCII text. Open text in Word. Run find/change. In the find box put one space. Leave the "change to" box empty. Click "change all" until you get "no changes made." Save, open in Excel, go to town.
Ptah
(33,024 posts)NewJeffCT
(56,828 posts)I also multiplied the entire column by 1, which usually works, and that didn't, either.
my problem was solved above, though.