close

Is this possible?

I'm concatenating several columns, and then copying that into a text file so
I can view it in Notepad. But I want a carriage return in there to break it
into two lines. CHAR(10) appears as a square in Notepad.

Hi Chris,

not as far as I know.

But you could use a macro to write these rows in a text-file (even faster
than copying it manually ).
There you can use e.g. vbLf or vbCr...

Did this help you?

Best wishes,
Eric

quot;Chris Glenquot; wrote:

gt; Is this possible?
gt;
gt; I'm concatenating several columns, and then copying that into a text file so
gt; I can view it in Notepad. But I want a carriage return in there to break it
gt; into two lines. CHAR(10) appears as a square in Notepad.

I tried char(10) and char(13) in Notepad and got the same results. However,
using Wordpad and doing a paste special unformatted text resulted in seperate
lines for both.
--
Kevin Vaughnquot;Chris Glenquot; wrote:

gt; Is this possible?
gt;
gt; I'm concatenating several columns, and then copying that into a text file so
gt; I can view it in Notepad. But I want a carriage return in there to break it
gt; into two lines. CHAR(10) appears as a square in Notepad.

Hi Chris,

Excel only recognizes CHAR(10) or in VBA CHR(10) which is actually a LF (line-feed)
and in order for it to be effective you must have wrap turned on (format, cells, alignment, wrap text).
When you use Alt Enter you automatically get wrapping turned on for that cell.

if you are seeing the square bullet in Excel then you probably just need to turn on
Cell Wrapping (as described above)

To concatenate cells within the worksheet you can use something like
=A1 amp; Char(10) amp; B1
or something slightly different
=A1 amp; Char(10) amp; quot; quot; amp; B1
which would indent the second line one character before the first line.To look for CHAR(10) using Find, Replace, or Text to Columns you
would hold Alt 0010 or
on a laptop use Fn Alt 0010 on numeric keypad with NumLock off.
which will produce 1 character that you won't see.

It always worked for me in earlier versions of Excel and I don't know
why Alt 0010 is not working for me in Excel 2002, and incidentally
it still works in Notepad.

additional information in
www.mvps.org/dmcritchie/rexx/htm/symbols.htm

---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: www.mvps.org/dmcritchie/excel/excel.htm
Search Page: www.mvps.org/dmcritchie/excel/search.htm

quot;Kevin Vaughnquot; gt; wrote in message ...
gt; I tried char(10) and char(13) in Notepad and got the same results. However,
gt; using Wordpad and doing a paste special unformatted text resulted in seperate
gt; lines for both.
gt; --
gt; Kevin Vaughn
gt;
gt;
gt; quot;Chris Glenquot; wrote:
gt;
gt; gt; Is this possible?
gt; gt;
gt; gt; I'm concatenating several columns, and then copying that into a text file so
gt; gt; I can view it in Notepad. But I want a carriage return in there to break it
gt; gt; into two lines. CHAR(10) appears as a square in Notepad.

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()