View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Excel: How to insert carriage returns in a formula to manipulate t

=A1 & CHAR(10) & A2


Gord Dibben MS Excel MVP

On Thu, 21 Jun 2007 08:01:04 -0700, Cardinal2B
wrote:

I know that Alt-Enter inserts a carriage return in a cell, however, I need to
do this programatically, gathering text from cell one, inserting the carriage
return, then text from cell 2.

Cell A1 contains the text "LINE ONE "
Cell A2 contains the text "LINE TWO"

=A1&A2 will give you LINE ONE LINE TWO

But, what I need is:
LINE ONE
LINE TWO

Using Word Wrap is not an answer I can use, the formula needs to contain a
carriage return. Many thanks!