ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Line break formula (https://www.excelbanter.com/excel-discussion-misc-queries/151447-line-break-formula.html)

Cat

Line break formula
 
Hello,

I need to combine two cells into one - which I can do using the ampersand
formula, however I need to insert a line break between the information in the
two cells. Would someone please be able to point me in the right direction as
to how I would do this?

Many thanks,
Catriona

Pete_UK

Line break formula
 
You need to add character code 10, like so:

=A1&CHAR(10)&B1

Hope this helps.

Pete

On Jul 24, 3:34 pm, Cat wrote:
Hello,

I need to combine two cells into one - which I can do using the ampersand
formula, however I need to insert a line break between the information in the
two cells. Would someone please be able to point me in the right direction as
to how I would do this?

Many thanks,
Catriona




Ron Coderre

Line break formula
 
Try something like this:

B1: =A1&CHAR(10)&A2

That formula appends the value in A2 to the value in A1, separated by a
carriage return......(that's what ASCII character 10 is)

Remember to set the cell format to wrap text and adjust the column width if
you need to.

Does that help?
***********
Regards,
Ron

XL2003, WinXP


"Cat" wrote:

Hello,

I need to combine two cells into one - which I can do using the ampersand
formula, however I need to insert a line break between the information in the
two cells. Would someone please be able to point me in the right direction as
to how I would do this?

Many thanks,
Catriona



All times are GMT +1. The time now is 01:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com