I ran across the need to insert a line break into a formula in Excel 2008 (I am pretty sure this works with most older versions too). My problem was simple:
What I had:
What I wanted was a newline within a cell that combined other cells:
On Windows use the following:
On Mac use the following:
The line feed / carriage return character is different, so at least for viewing and printing, the above char codes should be used depending on your operating system.
What I had:
Column A Column B
1 John 12345
2 Fred 67890
What I wanted was a newline within a cell that combined other cells:
Column C
1 John
12345
2 Fred
67890
On Windows use the following:
=A1 & CHAR(10) & B1
On Mac use the following:
=A1 & CHAR(13) & B1
The line feed / carriage return character is different, so at least for viewing and printing, the above char codes should be used depending on your operating system.