![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 4
|
How can include a hard return in a concatenated string? i want to stack multiple cells (that make up an address in this case) in a cell formated to wrap.
|
|
|
|
|
|
#2 |
|
Guest
Posts: n/a
|
try alt+enter
|
|
|
|
#3 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Winnipeg
Posts: 2,330
|
Quote:
="Barrie"&CHAR(10)&"Davidson" Regards,
__________________
Barrie Davidson "You're only given a little spark of madness. You mustn't lose it." - Robin Williams |
|
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
="the cat"&CHAR(10)&"in the hat"
|
|
|
|
|
|
#5 |
|
New Member
Join Date: Mar 2002
Posts: 4
|
CHAR(10) works great, couldn't get Alt+ Enter to work (I had tried that). Any idea how to avoid wrapping blank cells?
|
|
|
|
|
|
#6 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
{=A1&IF(AND(ISTEXT(A1:B1)),CHAR(10),"")&B1}
{=A1&IF(OR(ISBLANK(A1:B1)),"",CHAR(10))&B1} Note: These are array formulae which must be entered using the Control+Shift+Enter key combination. The outermost braces, { }, are not entered by you -- they're supplied by Excel in recognition of a properly entered array formula. Or... =A1&IF(AND(ISTEXT(A1),ISTEXT(B1)),CHAR(10),"")&B1 =A1&IF(OR(ISBLANK(A1),ISBLANK(B1)),"",CHAR(10))&B1 [ This Message was edited by: Mark W. on 2002-03-08 09:54 ] |
|
|
|
|
|
#7 |
|
New Member
Join Date: Mar 2002
Posts: 4
|
Thanks
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|