Concatenated data in a text Box

SteveT57

New Member
Joined
Jun 8, 2011
Messages
42
Hi I Have a text box on a graph with Concatenated data and I would like to be able to force different parts of the data onto a new row. Below is my formulae:
="Current Week Total - "&L6&""&" Last 13 Weeks Avg - "&ROUND(L7,0)&" % Chg "&TEXT(M6,"0.0%")
I would like new rows as per below

="Current Week Total - "&L6&""&" - 1st row
Last 13 Weeks Avg - "&ROUND(L7,0)&" - 2nd row
% Chg "&TEXT(M6,"0.0%") - 3rd row

Thanks in advance

Steve.T
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Just concatenate CHAR(10) into your formula wherever you want the line break to occur. For your request...

Code:
="Current Week Total - "&L6&""&CHAR(10)&"Last 13 Weeks Avg - "&ROUND(L7,0)&CHAR(10)&"% Chg "&TEXT(M6,"0.0%")
Note that you won't see the individual lines in the cell itself until you format the cell for "Word text".
 
Upvote 0
Hi I Have a text box on a graph with Concatenated data and I would like to be able to force different parts of the data onto a new row. Below is my formulae:
="Current Week Total - "&L6&""&" Last 13 Weeks Avg - "&ROUND(L7,0)&" % Chg "&TEXT(M6,"0.0%")
I would like new rows as per below

="Current Week Total - "&L6&""&" - 1st row
Last 13 Weeks Avg - "&ROUND(L7,0)&" - 2nd row
% Chg "&TEXT(M6,"0.0%") - 3rd row

Thanks in advance

Steve.T

Try using CHR$(13) as a carriage return

Code:
MsgBox ("First Line " & Chr$(13) & _
     "Second Line ")
 
Upvote 0
Thanks Roli001,
It works sort of as gget the data on a new row but end with Chr$(13) as part of the text
 
Upvote 0
Thanks Roli001,
It works sort of as gget the data on a new row but end with Chr$(13) as part of the text
If you are doing this in VBA (which I did not get from your postings), try using Chr$(10) instead or, better yet, use the built-in VB constant vbLf instead. So...
Code:
'Either this...
 
MsgBox "First Line " & Chr$(10) & "Second Line "
 
'or this...
 
MsgBox "First Line " & vbLf & "Second Line "
 
Upvote 0

Forum statistics

Threads
1,224,503
Messages
6,179,136
Members
452,890
Latest member
Nikhil Ramesh

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top