Insert a Newline in Excel Formula (MacOS)

Xofo picture Xofo · Nov 4, 2009 · Viewed 18k times · Source

I am using MS Excel on a Mac.

I have a formula, and I wish to insert a newline into it:

Guests!A1 & " " & Guests!B1 & [newline here] Guests!C1

How can I do this?

Answer

richardtallent picture richardtallent · Nov 4, 2009

CHAR() is the appropriate function for an Excel formula, and you need character 10 (Line Feed) to create a line break. Example:

Guests!A1 & " " & Guests!B1 & CHAR(10) & Guests!C1

You'll need to have word-wrapping enabled on the cell, otherwise CHAR(10) will just look like a little square.

vbCRLF would be the right choice when using VBA (i.e., a macro). The question is about formulas, not VBA.