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

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

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
 
Upvote 0

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?
 
Upvote 0

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
 
Upvote 0

Forum statistics

Threads
1,187,180
Messages
5,962,062
Members
438,579
Latest member
fishkeeper

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