We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

Carraige Return Symbol?

troyhalsey
troyhalsey asked
on
Medium Priority
277 Views
Last Modified: 2010-04-07
I am getting a weird box symbol at the end of each line of text in a cell.  I assume it is from the carriage returns used in the textbox that the source of the text is from.  Anyone know how to get rid of that symbol from each line?

Troy

Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2010
Commented:
Hi Troy,

MyString = Replace(MyString, vbCrLf, " ")

Regards,

Patrick

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
[ fanpages ]Consultant (Development Team Lead, Senior Support Engineer, and Technical Test Leader)
CERTIFIED EXPERT

Commented:
Hi Troy,

I'm presuming you mean a cell in MS-Excel.

With the value in, say, cell A1, you could place this formula in any other cell:
=CLEAN(A1)

This will remove the first 32 non-printing characters in the 7-bit ASCII code (values 0 through 31).  These codes will also show as "weird box" symbols.


If the value in the cell has been copied from a web page, the most likely character is 160 (a non-breaking space).

To remove this:
=TRIM(SUBSTITUTE(A1,CHAR(160),CHAR(32)))


You may also like to read the text within this PAQ:
"how to delete the unseen characters in the cell?"
[ http://www.experts-exchange.com/Applications/MS_Office/Excel/Q_21738999.html ]

BFN,

fp.
[ http://www.justgiving.com/100RoundsOfSparring ]
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.