?
Solved

Getting rid of trailing space in MS Excel

Posted on 2014-12-16
3
Medium Priority
?
143 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 23

Accepted Solution

by:
Ejgil Hedegaard earned 1200 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 800 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
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 how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

770 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