Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • Excel Bar Chart
  • How To Load Analysis ToolPak in Excel
  • How to calculate correlation coefficient Correlation in Excel
  • Conditional Formatting Color Scales Examples in Excel
  • How to add Trendline to a chart in Excel

References

  • How to retrieve first match between two ranges in Excel
  • CHOOSE function: Description, Usage, Syntax, Examples and Explanation
  • Multi-criteria lookup and transpose in Excel
  • How to create dynamic named range with OFFSET in Excel
  • How to get last column number in range in Excel

Data Validations

  • Excel Data validation allow uppercase only
  • Excel Data validation allow weekday only
  • Excel Data validation only dates between
  • Excel Data validation no punctuation
  • Excel Data validation require unique number

Add line break based on OS in Excel

by

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.

Formula

=IF(INFO("system")="mac",CHAR(13),CHAR(10))

Explanation

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:

=IF(INFO("system")="mac",CHAR(13),CHAR(10))

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).

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

=B6&break&C6&break&D6

The result of the concatenation is text with line breaks:

Traci Brown¬
1301 Robinson Court¬
Saginaw, MI 48607

 

Post navigation

Previous Post:

DECIMAL function: Description, Usage, Syntax, Examples and Explanation

Next Post:

AVERAGE function: Description, Usage, Syntax, Examples and Explanation

Leave a Reply Cancel reply

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

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • How to return blank in place of #DIV/0! error in Excel
  • AND function: Description, Usage, Syntax, Examples and Explanation
  • How to use Excel TRUE Function
  • Excel If, Nested If, And/Or Criteria Examples
  • IFNA function: Description, Usage, Syntax, Examples and Explanation

Date Time

  • DAYS360 function: Description, Usage, Syntax, Examples and Explanation
  • Get age from birthday in Excel
  • WEEKDAY function: Description, Usage, Syntax, Examples and Explanation
  • Add workdays to date custom weekends in Excel
  • How to calculate next day of week in Excel

Grouping

  • Running count group by n size in Excel
  • Group times into 3 hour buckets in Excel
  • How to randomly assign people to groups in Excel
  • Categorize text with keywords in Excel
  • Calculate conditional mode with criteria in Excel

General

  • Share Excel data with Word documents
  • Cell References: Relative, Absolute and Mixed Referencing Examples
  • Print Excel Sheet In Landscape Or Portrait
  • How to add sequential row numbers to a set of data in Excel
  • How to calculate profit margin percentage in Excel
© 2026 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning