Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to do a line break in a text formula

I have a cell with alignment set to "Wrap Text". If I just enter tex
into this cell, and press Alt-Enter on my keyboard, I can enter
carriage return into the cell that results in a line split:

This is sample[alt-enter]
text

What I want to do is make a text *formula* which will include a lin
split in it. I've tried using the Char() function in my text formula
but Excel shows the characters themselves, instead of acting on them.


Here is an example of a formula I've tried:

="This is sample" & char(15) & char(11) & "text"

I've tried all three combinations of carriage return, linefeed an
carriage return/linefeed combinations, but the formula doesn't resul
in a split line.

Does anyone know if it's possible to do what I'm trying to do?

Thanks for any help.

PL

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default How to do a line break in a text formula

Hi
try
="This is sample" & CHAR(10) & "text"
anf format the resulting cell with word wrap ('Format - Cell -
alignment)


--
Regards
Frank Kabel
Frankfurt, Germany


I have a cell with alignment set to "Wrap Text". If I just enter

text
into this cell, and press Alt-Enter on my keyboard, I can enter a
carriage return into the cell that results in a line split:

This is sample[alt-enter]
text

What I want to do is make a text *formula* which will include a line
split in it. I've tried using the Char() function in my text

formula,
but Excel shows the characters themselves, instead of acting on them.


Here is an example of a formula I've tried:

="This is sample" & char(15) & char(11) & "text"

I've tried all three combinations of carriage return, linefeed and
carriage return/linefeed combinations, but the formula doesn't result
in a split line.

Does anyone know if it's possible to do what I'm trying to do?

Thanks for any help.

PLM


---
Message posted from http://www.ExcelForum.com/


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 690
Default How to do a line break in a text formula

What I want to do is make a text *formula* which will include a line
split in it.


Just another way:

[A1] = "This is line 1" & vbLf & "Line 2"

--
Dana DeLouis
Using Windows XP & Office XP
= = = = = = = = = = = = = = = = =


"TJCacher " wrote in message
...
I have a cell with alignment set to "Wrap Text". If I just enter text
into this cell, and press Alt-Enter on my keyboard, I can enter a
carriage return into the cell that results in a line split:

This is sample[alt-enter]
text

What I want to do is make a text *formula* which will include a line
split in it. I've tried using the Char() function in my text formula,
but Excel shows the characters themselves, instead of acting on them.


Here is an example of a formula I've tried:

="This is sample" & char(15) & char(11) & "text"

I've tried all three combinations of carriage return, linefeed and
carriage return/linefeed combinations, but the formula doesn't result
in a split line.



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
How do I create a line break writing text within a cell? Shel Excel Discussion (Misc queries) 1 December 11th 08 12:19 AM
Force line break based on text Quizologist Excel Discussion (Misc queries) 3 June 4th 08 05:46 PM
Possible to add a Line break in a formula ? Ricardo the Numpty Excel Discussion (Misc queries) 2 February 13th 08 11:06 AM
Line break formula Cat Excel Discussion (Misc queries) 2 July 24th 07 03:46 PM
How do I insert a line break (carriage return) in text in a cell? Nitronorry Excel Discussion (Misc queries) 3 September 3rd 06 04:53 PM


All times are GMT +1. The time now is 08:29 PM.

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"