Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Carriage return in merged cells 1

Status
Not open for further replies.

DrSmyth

Technical User
Jul 16, 2003
557
GB
I've got an excel spreadsheet where a user selects a number of cells from a single column, and then clicks on a button to do some stuff with the selection.

Basically it merges the cells, makes the new large cell a single color and then inserts some text (strText1 and strText2) is it possible to carriage return inside a merged cell so that the text is on two "lines". Now I don't know of a way of doin this just in excel, so I'm guessing there may not be a coding solution... But if there is does anybody know of it???

Thanks in advance for any help, I can post the code is necesary..

Dr
 
=str1 + vbcr + str2
you can use the vb code for carriage return.

or this will also have the same effect
=str3 + vblf + str4
this is the VB code of a line feed.

Hope this is helpful.

Kevin Petursson
 
Cheers Kevin... works like a dream..... star is on it's way...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top