Replacing Carriage Return

Anonymous
2013-10-25T21:25:58+00:00

I am trying to export address information from our Accounting Software so that I can import it into our Shipping Software.

In our Accounting Software, the address information is contained in one box (no line 1, line 2, etc...) and you hit control-return to add a new line.  When I export an address is more than one line into Excel, it looks like this:

I have tried doing a find and replace function with both Control-010 and Alt-010, but this is what I get:

Any ideas on why it replaces one of the characters (box with ? in it), but not the other one?

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

11 answers

Sort by: Most helpful
  1. HansV 462.4K Reputation points MVP Volunteer Moderator
    2013-10-25T22:15:00+00:00

    Select the range you want to convert.

    Press Alt+F11 then Ctrl+G to activate the Immediate window in the Visual Basic Editor.

    Type or copy / paste the following line:

    Selection.Replace vbCr, ""

    With the insertion point anywhere in that line, press Enter.

    Switch back to Excel.

    0 comments No comments
  2. Ashish Mathur 100.8K Reputation points Volunteer Moderator
    2013-10-25T23:06:10+00:00

    Hi,

    Try this

    1. Copy the data to Notepad
    2. Copy the special character in Notepad and press Ctrl+H
    3. Press Ctrl+V in the Find what box
    4. Click on Replace All

    Hope this helps.

    0 comments No comments
  3. Anonymous
    2013-10-28T14:57:40+00:00

    Unfortunately, neither of these worked for me.  This is what I get when I try to do the visual basic idea:

    A1 is the original

    A3 is the original copies and then the visual basic applied to it:

    It looks like that creates a multi line (within the same cell) entry, and there is still one of those special characters.

    0 comments No comments
  4. HansV 462.4K Reputation points MVP Volunteer Moderator
    2013-10-28T16:30:47+00:00

    Try the following (using the example from your screenshot):

    In B1, enter the formula =CODE(MID(A1,17,1))

    In C1, enter the formula =CODE(MID(A1,18,1))

    What is the result of these formulas?

    0 comments No comments
  5. Anonymous
    2013-10-28T16:41:23+00:00

    Try the following (using the example from your screenshot):

     

    In B1, enter the formula =CODE(MID(A1,17,1))

    In C1, enter the formula =CODE(MID(A1,18,1))

     

    What is the result of these formulas?

    B1 = 13

    C1 = -10

    0 comments No comments