Solved

Getting rid of trailing space in MS Excel

Posted on 2014-12-16
3
135 Views
Last Modified: 2014-12-16
I cannot get rid of a trailing space in a cell.
The contents is always a string value although consisting of digits and this trailing space or something that I can't see.
The length of the string varies and sometimes the space is not there. so I can't use Left() function.
I have tried Trim() and Clean()
Can anyone help please.
I attach a small spreadsheet with the cell with the trailing space in and what I tried.
I Use W7 and Office 2010
Book1.xlsx
0
Comment
Question by:Fritz Paul
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 22

Accepted Solution

by:
Ejgil Hedegaard earned 300 total points
ID: 40503282
It is not a space, but ASCII code 160, so use this to remove it.
=SUBSTITUTE(B2,CHAR(160),"")
0
 
LVL 6

Assisted Solution

by:oferam
oferam earned 200 total points
ID: 40503283
Indeed it's a weird character you are trying to remove.

You can use the following function to remove it =SUBSTITUTE(B3," ",""), Basically it would replace it with nothing.

Attached is also a sample excel.
Book1.xlsx
0
 

Author Closing Comment

by:Fritz Paul
ID: 40503296
Thanks for your help.
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question