Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / August 2006

Tip: Looking for answers? Try searching our database.

use concatenate function to put carrage returns in a text string

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dabblingandconfused - 30 Apr 2006 23:44 GMT
How do I use concatenate to assemble a string that includes carrage returns?
Biff - 30 Apr 2006 23:56 GMT
Hi!

Try this:

To concatenate A1 and B1 with a "hard return" in-between:

=A1&CHAR(10)&B1

Format the cell to wrap text:

Format>Cells>Alignment>Wrap text

Biff

> How do I use concatenate to assemble a string that includes carrage
> returns?
Kishor - 01 May 2006 05:42 GMT
hi,
Try this function.

Function AddText(CellsToAdd, TextSeperator)
y = CellsToAdd.Cells.Count
i = 1
For i = 1 To y
z = CellsToAdd(i)
k = k & TextSeperator & z
Next i
AddText = k
End Function
' =AddText(A1:E1," ") this example can add all text from range A1:E1 with
space as separator.

> Hi!
>
[quoted text clipped - 12 lines]
> > How do I use concatenate to assemble a string that includes carrage
> > returns?
Martha - 15 Aug 2006 16:54 GMT
Biff,
Do you know if there's a limit to the number of CHAR(10)s allowed in one
formual.  I have one with four that's working fine, but when I addeed the
fifth, it refuses to work.  Have tried moving the fifth column of data to the
left of the formula (with the other columns), all lower case, all upper case
and with and without spaces.  Can you help?  Thanks much,

Martha

> Hi!
>
[quoted text clipped - 12 lines]
> > How do I use concatenate to assemble a string that includes carrage
> > returns?
Martha - 15 Aug 2006 16:58 GMT
Biff,

Do you know if there is a limit to the number of CHAR(10)s allowed in one
formula.  I have a formula with four that is working fine, but when I added
the fifth, it refused to work.  Have tried re-formatting the column; all
upper case, all lower case, with and without spaces after the commas, and so
far, no luck.  Can you help?

=CONCATENATE(C2,CHAR(10),TEXT(D2, "d-mmm-yyyy"),CHAR(10),G2,CHAR(10),I2," -
",J2)  WORKS FINE

=CONCATENATE(C2,CHAR(10),TEXT(D2, "d-mmm-yyyy"),CHAR(10),G2,CHAR(10),I2," -
",J2,CHAR(10),K2)      DOESN'T WORK

> Hi!
>
[quoted text clipped - 12 lines]
> > How do I use concatenate to assemble a string that includes carrage
> > returns?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.