Solved

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

Posted on 2014-03-04
5
2,210 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
[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
  • 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

Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

749 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