Solved

Removing ASC 63 character from Excel - TRIM, CLEAN and SUBSTITUTE not working...

Posted on 2014-03-04
5
2,123 Views
Last Modified: 2014-03-05
Hello Experts

I'm trying to remove some extra white spaces, but TRIM, CLEAN and SUBSTITUTE not working.

I used CODE( ) to identify the character as 63. I tried to use SUBSTITUTE but it didn't work.

I'm stumped!

Source text is Japanese.

Please see attached workbook for a few examples.
0
Comment
Question by:tomfolinsbee
  • 2
  • 2
5 Comments
 
LVL 12

Assisted Solution

by:tel2
tel2 earned 100 total points
ID: 39905405
Hi Tom,

ASCII 63 is "?", so...

With Excel 2003, if I put this in A1:
    1?2?3
then this in A2:
    =SUBSTITUTE(A1,"?","")
then this appears in A2:
    123

To start with, please try exactly that, and let us know the results.
0
 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 39905462
If the original text is Japanese then it's double byte or unicode text. I'm puzzled how you are identifying "white space" as a 63 which, as tel2 pointed out, is a ASCII question mark.

Can you post the workbook? You said you did but it was not posted in the question.

Kevin
0
 

Author Comment

by:tomfolinsbee
ID: 39905595
Thanks for the replies.

Here's the file with some samples.

The white space is in the last position. This expression returns 63...

=CODE(RIGHT(A2,1))

Thanks!
extra-white-space.xlsx
0
 
LVL 81

Accepted Solution

by:
zorvek (Kevin Jones) earned 400 total points
ID: 39905633
The problem is that you are working with double byte or unicode text. The CODE function only works with ASCII (single byte) text so it is only picking up part of the two byte character.

The only way I can think of doing this is to use functions that handle unicode text and put a copy of the "white space" double byte character in a special cell so we can use it.

This formula works:

=SUBSTITUTE(A2,O$1,"")

assuming you have a copy of the "white space" character in O1.

See the attached workbook.

Kevin
extra-white-space.xlsx
0
 

Author Closing Comment

by:tomfolinsbee
ID: 39908415
Thanks, that did the trick.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
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…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

861 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