Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Hard return in concatenate

How do I enter a hard return between two fields I concatenate?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Hard return in concatenate

Like this:

=A1 & CHAR(10) & B1

CHAR(10) is the linefeed character (equivalent to Alt-Enter when you
do it manually).

Hope this helps.

Pete

On Feb 6, 1:08*am,
wrote:
How do I enter a hard return between two fields I concatenate?


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Hard return in concatenate

As a formula:
=a1&char(10)&"This is the second line"&char(10)&text(b1,"$#,##0.00")
(and format the cell for wraptext--or you'll see a little box for that
char(10).)

As input, you hit alt-enter to force a new line within the cell.

in code:
dim myStr as string
mystr = "Something" & vbnewline & "something else" & vblf & "a third thing"

vbnewline will work for both Mac's and PC's.
vbLf is enough for PC's.



wrote:

How do I enter a hard return between two fields I concatenate?


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 211
Default Hard return in concatenate

A1=Apple B1=Orange
I was expecting by this formula to get:
Apple
Orange (In two lines in a cell)
But I get:
AppleOrange
Char(10) didn't work for me.
I am using Excel 2003
--
R. Khoshravan
Please click "Yes" if it is helpful.


"Pete_UK" wrote:

Like this:

=A1 & CHAR(10) & B1

CHAR(10) is the linefeed character (equivalent to Alt-Enter when you
do it manually).

Hope this helps.

Pete

On Feb 6, 1:08 am,
wrote:
How do I enter a hard return between two fields I concatenate?



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default Hard return in concatenate

Hi,

You will have to wrap text (from Format cells)

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Khoshravan" wrote in message
...
A1=Apple B1=Orange
I was expecting by this formula to get:
Apple
Orange (In two lines in a cell)
But I get:
AppleOrange
Char(10) didn't work for me.
I am using Excel 2003
--
R. Khoshravan
Please click "Yes" if it is helpful.


"Pete_UK" wrote:

Like this:

=A1 & CHAR(10) & B1

CHAR(10) is the linefeed character (equivalent to Alt-Enter when you
do it manually).

Hope this helps.

Pete

On Feb 6, 1:08 am,
wrote:
How do I enter a hard return between two fields I concatenate?





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 82
Default Hard return in concatenate

On Feb 6, 11:52*am, "Ashish Mathur" wrote:
Hi,

You will have to wrap text (from Format cells)

--
Regards,

Ashish Mathur
Microsoft Excel MVPwww.ashishmathur.com

"Khoshravan" wrote in message

...

A1=Apple B1=Orange
I was expecting by this formula to get:
Apple
Orange (In two lines in a cell)
But I get:
AppleOrange
Char(10) didn't work for me.
I am using Excel 2003
--
R. Khoshravan
Please click "Yes" if it is helpful.


"Pete_UK" wrote:


Like this:


=A1 & CHAR(10) & B1


CHAR(10) is the linefeed character (equivalent to Alt-Enter when you
do it manually).


Hope this helps.


Pete


On Feb 6, 1:08 am,
wrote:
How do I enter a hard return between two fields I concatenate?


Thanks. That was a point missed on replies.
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 insert a hard return in a =CONCATENATE formula in excel Dina Excel Worksheet Functions 1 April 11th 08 08:14 PM
Hard return ttribble Excel Worksheet Functions 4 June 19th 07 04:33 AM
HARD RETURN IN A CELL Dave T Excel Discussion (Misc queries) 4 April 18th 07 03:14 AM
Replace ; with hard return Stephanie Excel Discussion (Misc queries) 11 April 17th 07 10:11 PM
hard return alphadog47 New Users to Excel 2 February 26th 05 08:38 PM


All times are GMT +1. The time now is 09:54 PM.

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"