Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2014-03-04
5
Medium Priority
?
2,810 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 400 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 1600 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
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…

715 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