Add line break based on OS in Excel

To add a line break taking into account the current OS (Mac or Windows), you can use the INFO function to test the system and then return the correct break character — CHAR(10) for Windows, CHAR(13) for Mac.

Note: make sure you have text wrap enabled on cells that contain line breaks.

Also See:   How to Check If A Cell Contains Specific Text in Excel




The character used for line breaks is different depending on whether Excel is running on Mac or Windows: CHAR(10) for Windows, CHAR(13) for Mac. This makes it tricky to write a single formula that will work as expected on both platforms.

The solution is to use the INFO function to test the current environment, then adjust the line break character accordingly. We do this by adding this formula to C3:


Then we we name C3 “break” so we can use the word break like a variable later. If Excel is running on a Mac, break will equal CHAR(13), if not, break will equal CHAR(10).

Also See:   Count Errors in Excel

In column E, we concatenate the address information that appears in B, C, and D with a formula like this:


The result of the concatenation is text with line breaks:

Traci Brown¬
1301 Robinson Court¬
Saginaw, MI 48607


Leave a Reply

Your email address will not be published. Required fields are marked *