Solved

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

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

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Excel VBA - copying formats 7 22
Create a loop to find all instances of a string 6 29
Macro 3 20
onOpen 14 41
INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
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.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
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…

757 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

24 Experts available now in Live!

Get 1:1 Help Now