Excel newline (char (10)) copy / paste

I'm trying to use CHAR(10)

to create great formatting for some of the scenarios I create, but copy and paste doesn't work for me. I am running Windows 8.1 atm. Here is an illustrative example. Using the formula:

="hello"&CHAR(10)&"world"

      

I am getting hello[newline]world

in Excel. Copy / paste into Notepad, I would expect

hello
world

      

But when I actually do this copy / paste, I get:

helloworld

      

Now I know the newline is there, because if I copy that output from notepad into this very window, I get the newline again. Ultimately I need c / p from Excel to plaintext with (visible) line breaks. Any ideas how I can do this?

+3


source to share


1 answer


A "newline" in Windows is usually a carriage return followed by a line. These are two separate character codes: 13 and 10, respectively.

So, your formula in Excel should be:



="hello"&CHAR(13)&CHAR(10)&"world"

      

+5


source







All Articles