Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default Inserting a CR into a text string

I want to concatenate two strings in a worksheet to be used in a text box in
a chart however I would like the two strings to appear on seperate lines in
the text box. Is there a way to insert a carriage return between the two
concatenated strings in the worksheet?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Inserting a CR into a text string

Try this in C1, with your strings in A1 and B1:

=A1&CHR(10)&B1

In C1 use Format | Cells | Alignment (tab) and check Wrap Text to see
the effect.

Hope this helps.

Pete

rtbrd wrote:

I want to concatenate two strings in a worksheet to be used in a text box in
a chart however I would like the two strings to appear on seperate lines in
the text box. Is there a way to insert a carriage return between the two
concatenated strings in the worksheet?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default Inserting a CR into a text string

Pete, thanks that worked but I had to use the CHAR function, CHR returned an
error. In the worksheet it still shows as one line but in the chart the two
strings appear on seperate line, exactly what I wanted.

Joe

"Pete_UK" wrote:

Try this in C1, with your strings in A1 and B1:

=A1&CHR(10)&B1

In C1 use Format | Cells | Alignment (tab) and check Wrap Text to see
the effect.

Hope this helps.

Pete

rtbrd wrote:

I want to concatenate two strings in a worksheet to be used in a text box in
a chart however I would like the two strings to appear on seperate lines in
the text box. Is there a way to insert a carriage return between the two
concatenated strings in the worksheet?



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Inserting a CR into a text string

Select the cell(s)
format|cells|alignment tab|check Wrap Text

And it'll look pretty in the cell, too.

This char(10) is the same as alt-enter if you're entering plain old text.

rtbrd wrote:

Pete, thanks that worked but I had to use the CHAR function, CHR returned an
error. In the worksheet it still shows as one line but in the chart the two
strings appear on seperate line, exactly what I wanted.

Joe

"Pete_UK" wrote:

Try this in C1, with your strings in A1 and B1:

=A1&CHR(10)&B1

In C1 use Format | Cells | Alignment (tab) and check Wrap Text to see
the effect.

Hope this helps.

Pete

rtbrd wrote:

I want to concatenate two strings in a worksheet to be used in a text box in
a chart however I would like the two strings to appear on seperate lines in
the text box. Is there a way to insert a carriage return between the two
concatenated strings in the worksheet?




--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Inserting a CR into a text string

I bet Pete meant:

=A1&CHaR(10)&B1



Pete_UK wrote:

Try this in C1, with your strings in A1 and B1:

=A1&CHR(10)&B1

In C1 use Format | Cells | Alignment (tab) and check Wrap Text to see
the effect.

Hope this helps.

Pete

rtbrd wrote:

I want to concatenate two strings in a worksheet to be used in a text box in
a chart however I would like the two strings to appear on seperate lines in
the text box. Is there a way to insert a carriage return between the two
concatenated strings in the worksheet?


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default Inserting a CR into a text string

Pete' keyboard had a hiccup today; he meant to type CHAR(10)
best wishes
Bernard_Canada
www.stfx.ca/people/bliengme
remove caps from email

"rtbrd" wrote in message
...
I want to concatenate two strings in a worksheet to be used in a text box
in
a chart however I would like the two strings to appear on seperate lines
in
the text box. Is there a way to insert a carriage return between the two
concatenated strings in the worksheet?



  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Inserting a CR into a text string

Thanks Dave and Bernard for the correction - too much VBA at the moment
<bg

Pete

Bernard Liengme wrote:

Pete' keyboard had a hiccup today; he meant to type CHAR(10)
best wishes
Bernard_Canada
www.stfx.ca/people/bliengme
remove caps from email

"rtbrd" wrote in message
...
I want to concatenate two strings in a worksheet to be used in a text box
in
a chart however I would like the two strings to appear on seperate lines
in
the text box. Is there a way to insert a carriage return between the two
concatenated strings in the worksheet?


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
List File Properties - Author SS Excel Worksheet Functions 1 June 23rd 06 04:56 PM
How do I grab the date from a text string? [email protected] Excel Worksheet Functions 4 June 6th 06 07:55 AM
Find & Replace text format jmn13 Excel Discussion (Misc queries) 2 May 25th 06 06:18 PM
Text string and sum michaelp Excel Worksheet Functions 4 November 14th 05 09:49 PM
Formulas dealing with text data Bagia Excel Worksheet Functions 6 June 20th 05 10:29 PM


All times are GMT +1. The time now is 05:23 AM.

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

About Us

"It's about Microsoft Excel"