Solved

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

Posted on 2014-03-04
5
1,923 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

863 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

Need Help in Real-Time?

Connect with top rated Experts

29 Experts available now in Live!

Get 1:1 Help Now