Carraige Return Symbol?

Posted on 2006-03-27
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?


Question by:troyhalsey
    LVL 92

    Accepted Solution

    Hi Troy,

    MyString = Replace(MyString, vbCrLf, " ")


    LVL 35

    Expert Comment

    by:[ fanpages ]
    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:

    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:

    You may also like to read the text within this PAQ:
    "how to delete the unseen characters in the cell?"
    [ ]


    [ ]

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
    I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

    760 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

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now