Solved

excel clean function removes lowercase d characters

Posted on 2014-02-09
2
212 Views
Last Modified: 2014-02-09
This is driving me nuts. I found a formula to clean special characters from excel text that get carried along with some csv files I download. It "used to" work but now it's broken. this is the formula:

=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(TRIM(CLEAN(A57)),"$",""),"%",""),CHAR(160)," "),CHAR(100)," "),CHAR(152)," ")

However it deletes all lowercase "d" characters. Is there a better way to do this or is there an error in the formula?
0
Comment
Question by:orerockon
2 Comments
 
LVL 50

Accepted Solution

by:
barry houdini earned 500 total points
ID: 39845599
Your formula is replacing CHAR(100) with a space, CHAR(100)="d" - that should probably be CHAR(10) which is a "line break" character in Excel.

If you simply change CHAR(100) to CHAR(10), though, you won't get CHAR(10) replaced by a space because CLEAN function will remove CHAR(10) before you get to the SUBSTITUTE function, so you need to change the order of the functions a little like this:

=SUBSTITUTE( SUBSTITUTE( SUBSTITUTE( SUBSTITUTE( TRIM( CLEAN( SUBSTITUTE(A57, CHAR(10)," "))),"$",""),"%",""),CHAR(160)," "),CHAR(152)," ")

regards, barry
0
 

Author Comment

by:orerockon
ID: 39845687
Looks like it works, thanks!
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

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.
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!
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 …
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

730 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