[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 219
  • Last Modified:

excel clean function removes lowercase d characters

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
orerockon
Asked:
orerockon
1 Solution
 
barry houdiniCommented:
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
 
orerockonAuthor Commented:
Looks like it works, thanks!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now