Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default How can I do this

I wish to concatenate two cells containing text but include a CRLF between
the two parts of the result ... to give the same effect as using ALT +Enter
when entering the data directly.

If is this possible using vba ?
If so how is it achieved ?

Regards and TIA



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default How can I do this


You can just insert a line feed character at the point where you want
the text to wrap. Here's an example:

Sheet1.Range("A3").Value = _
Sheet1.Range("A1").Value & vbLf & _
Sheet1.Range("A2").Value

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


"sa3214 @eclipse.co.uk" <sa3214<REMOVE wrote in message
...
I wish to concatenate two cells containing text but include a CRLF between
the two parts of the result ... to give the same effect as using ALT

+Enter
when entering the data directly.

If is this possible using vba ?
If so how is it achieved ?

Regards and TIA





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default How can I do this

Hi sa3214,

Sub Tester()
Range("A1").Value = "Apple"
Range("B1").Value = "pie"
Range("C1") = Range("A1").Value & vbLf & Range("B1").Value

End Sub


---
Regards,
Norman


"sa3214 @eclipse.co.uk" <sa3214<REMOVE wrote in message
...
I wish to concatenate two cells containing text but include a CRLF between
the two parts of the result ... to give the same effect as using ALT

+Enter
when entering the data directly.

If is this possible using vba ?
If so how is it achieved ?

Regards and TIA





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default How can I do this


Many thanks for the very swift and explicit responses


Regards



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



All times are GMT +1. The time now is 12:34 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"