Include a hard return in a concatenated string

CAYMANIAC

New Member
Joined
Mar 7, 2002
Messages
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.
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
On 2002-03-08 09:09, CAYMANIAC wrote:
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.

If your cell is formatted to wrap, use this:

="Barrie"&CHAR(10)&"Davidson"

Regards,
 
Upvote 0
CHAR(10) works great, couldn't get Alt+ Enter to work (I had tried that). Any idea how to avoid wrapping blank cells?
 
Upvote 0
{=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
 
Upvote 0

Forum statistics

Threads
1,213,517
Messages
6,114,089
Members
448,548
Latest member
harryls

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top