using the Clean Command

msfire3

New Member
Joined
Jun 10, 2002
Messages
8
I have run the Clean command to remove the non-printable characters in my spreadsheet, but where the non-printable character was it should be a space there to separate the addresses. Is there a way to be able to say remove the non-printable character and put a space in its place?
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

Ekim

Well-known Member
Joined
Jun 30, 2002
Messages
1,416
I’m not sure of the character code for a non-printing character. However, if you have say a breaking space - char(10) – you can eliminate it with:

=SUBSTITUTE(A1,CHAR(10)," ")
where A1 contains your string.

You need to do the above type of formula before you run Clean (you may not have to run Clean at all).

To determine the character code of each item in a string (including spaces etc.), download the free CellView add-in from http://www.cpearson.com/excel/CellView.htm

When you install this add in, it will add an item to your View menu called "View Cell Contents". Simple select your text, and then click the View Cell Contents button.

HTH

Mike
 

msfire3

New Member
Joined
Jun 10, 2002
Messages
8
Thank you Mike that works good, but I see there is two non-printable characters in some of the addresses. How would I add another number to the command?
 

Ekim

Well-known Member
Joined
Jun 30, 2002
Messages
1,416
Nest the Substitute function like this:

=SUBSTITUTE(SUBSTITUTE(A1,Char(???)," "),Char(???)," ")

Replace the “???” with the code for the non-printing characters.

You can have up to 7 nested Substitutes.

Regards,

Mike
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,152,096
Messages
5,768,068
Members
425,451
Latest member
JohnBrooksBiddle

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top