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

Data Analysis

  • Move chart to a separate worksheet in Excel
  • Understanding Anova in Excel
  • Excel Bar Chart
  • Working With Tables in Excel
  • How to count table columns in Excel

References

  • Basic INDEX MATCH approximate in Excel
  • Excel Advanced Lookup using Index and Match Functions
  • Lookup entire row in Excel
  • How to get address of last cell in range in Excel
  • Count unique text values with criteria

Data Validations

  • How To Create Drop-down List in Excel
  • Excel Data validation number multiple 100
  • Excel Data validation no punctuation
  • Excel Data validation specific characters only
  • Excel Data validation with conditional list

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

  • Complete List of Excel Logical Functions, References and Examples
  • How to use Excel NOT Function
  • Return blank if in Excel
  • OR function Examples in Excel
  • How to use Excel FALSE Function

Date Time

  • How to calculate next scheduled event in Excel
  • Get fiscal quarter from date in Excel
  • Add months to date in Excel
  • Add days to date in Excel
  • NETWORKDAYS.INTL function: Description, Usage, Syntax, Examples and Explanation

Grouping

  • Group times into unequal buckets in Excel
  • Group numbers at uneven intervals in Excel
  • Group times into 3 hour buckets in Excel
  • If cell contains one of many things in Excel
  • Running count group by n size in Excel

General

  • How to calculate decrease by percentage in Excel
  • Check if range contains a value not in another range in Excel
  • How to generate random date between two dates in Excel
  • How to get amount with percentage in Excel
  • Count cells that contain errors in Excel
© 2025 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning