Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 42
Default Complications putting text into multiple lines within a cell

In EXCEL 2007, I have a formula in a cell that says =A1&A2&A3&A4. I am
putting together text from 4 other cells. What I would like to do is put
each one of these texts on individual lines within the cell. I know that
ALT+Enter will accomplish this, but this is a very large worksheet so if I
can do it within the formula that would be ideal.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Complications putting text into multiple lines within a cell

Try this:

=A1&CHAR(10)&A2&CHAR(10)&A3&CHAR(10)&A4

Ensure the cell is set for text wrap, then copy down.

Hope this helps.

Pete

On Jul 11, 7:04*pm, DoubleZ wrote:
In EXCEL 2007, I have a formula in a cell that says =A1&A2&A3&A4. *I am
putting together text from 4 other cells. *What I would like to do is put
each one of these texts on individual lines within the cell. *I know that
ALT+Enter will accomplish this, but this is a very large worksheet so if I
can do it within the formula that would be ideal.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default Complications putting text into multiple lines within a cell

This is from Excel 2003, should work the same:

=A1&char(10)&A2&char(10)&A3&char(10)&A4

CHAR(10) will force it to the next row. You should have the column be wide
enough to handle the date, and the row tall enough to handle 4 separate lines.


--
John C


"DoubleZ" wrote:

In EXCEL 2007, I have a formula in a cell that says =A1&A2&A3&A4. I am
putting together text from 4 other cells. What I would like to do is put
each one of these texts on individual lines within the cell. I know that
ALT+Enter will accomplish this, but this is a very large worksheet so if I
can do it within the formula that would be ideal.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default Complications putting text into multiple lines within a cell

make that, column wide enough to handle the data!
--
John C


"John C" wrote:

This is from Excel 2003, should work the same:

=A1&char(10)&A2&char(10)&A3&char(10)&A4

CHAR(10) will force it to the next row. You should have the column be wide
enough to handle the date, and the row tall enough to handle 4 separate lines.


--
John C


"DoubleZ" wrote:

In EXCEL 2007, I have a formula in a cell that says =A1&A2&A3&A4. I am
putting together text from 4 other cells. What I would like to do is put
each one of these texts on individual lines within the cell. I know that
ALT+Enter will accomplish this, but this is a very large worksheet so if I
can do it within the formula that would be ideal.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 42
Default Complications putting text into multiple lines within a cell

Thanks John C and Pete_UK, but i tried applying your responses and the
outcome is still one line that includes the text of all 4 cells, with a small
box with a question mark in it separating each text.

"Pete_UK" wrote:

Try this:

=A1&CHAR(10)&A2&CHAR(10)&A3&CHAR(10)&A4

Ensure the cell is set for text wrap, then copy down.

Hope this helps.

Pete

On Jul 11, 7:04 pm, DoubleZ wrote:
In EXCEL 2007, I have a formula in a cell that says =A1&A2&A3&A4. I am
putting together text from 4 other cells. What I would like to do is put
each one of these texts on individual lines within the cell. I know that
ALT+Enter will accomplish this, but this is a very large worksheet so if I
can do it within the formula that would be ideal.





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 42
Default Complications putting text into multiple lines within a cell

Sorry, I forgot to check text wrap. Thank you for your help.

"Pete_UK" wrote:

Try this:

=A1&CHAR(10)&A2&CHAR(10)&A3&CHAR(10)&A4

Ensure the cell is set for text wrap, then copy down.

Hope this helps.

Pete

On Jul 11, 7:04 pm, DoubleZ wrote:
In EXCEL 2007, I have a formula in a cell that says =A1&A2&A3&A4. I am
putting together text from 4 other cells. What I would like to do is put
each one of these texts on individual lines within the cell. I know that
ALT+Enter will accomplish this, but this is a very large worksheet so if I
can do it within the formula that would be ideal.



  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Complications putting text into multiple lines within a cell

You can enter the formula as others have suggested but for easier typing try
this UDF from Rick, modified to include the linefeed.

Function ConCatRng(CellBlock As Range) As String
'Rick Rothstein, July 5, 2008
Dim X As Long
Dim Z As Long
ReDim Content(1 To CellBlock.Count) As String
For X = 1 To UBound(Content)
If Len(CellBlock(X).Value) 0 Then
Z = Z + 1
Content(Z) = CellBlock(X).Value
End If
Next
If Z 0 Then
ReDim Preserve Content(1 To Z)
ConCatRng = Join(Content, Chr(10))
End If
End Function

Usage is: =concatrng(A1:A4)


Gord Dibben MS Excel MVP

On Fri, 11 Jul 2008 11:04:00 -0700, DoubleZ
wrote:

In EXCEL 2007, I have a formula in a cell that says =A1&A2&A3&A4. I am
putting together text from 4 other cells. What I would like to do is put
each one of these texts on individual lines within the cell. I know that
ALT+Enter will accomplish this, but this is a very large worksheet so if I
can do it within the formula that would be ideal.


  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Complications putting text into multiple lines within a cell

You're welcome.

Pete

On Jul 11, 9:33*pm, DoubleZ wrote:
Sorry, I forgot to check text wrap. *Thank you for your help.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple lines of text in a cell mcilwrk Excel Discussion (Misc queries) 3 April 21st 08 11:05 PM
putting multiple lines of text in one cell Greg Excel Discussion (Misc queries) 2 August 25th 06 05:54 PM
Display multiple lines of text within a cell from multiple column. Zeeshan Zaheer Excel Worksheet Functions 3 August 23rd 06 10:08 AM
Multiple lines of text in a cell tk Excel Discussion (Misc queries) 1 May 26th 06 04:20 PM
How do I get multiple lines of text in a Excel cell? Tene Excel Discussion (Misc queries) 10 September 9th 05 10:23 PM


All times are GMT +1. The time now is 08:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"