Excel Formulas to Add a Line Break Based on the Current OS ~ Quickly!!
Tags: excelformula, excelformulas
Published: 2021-06-02 03:50:15

---
title: Excel Formulas to Add a Line Break Based on the Current OS ~ Quickly!!
published: true
date: 2021-05-31 17:27:44 UTC
tags: ExcelFormula,Excelformulas
canonical_url: https://geekexcel.com/excel-formulas-to-add-a-line-break-based-on-the-current-os-quickly/
---

Dealing with the text in Excel can be painful as the formatting is limited within Excel cells. One method of organizing text is to add line breaks. In this article, we’ll explore ways of dealing with **add a line break based on the current OS in Excel**. Let’s get into this article!!

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. Here we will guide you to find the correct character for your OS. Get an official version of ** MS Excel**  from the following link: [https://www.microsoft.com/en-in/microsoft-365/excel](https://www.microsoft.com/en-in/microsoft-365/excel)

## Generic Formula:

- If you want to add a line break taking into account the current OS, use the below formula.

**=[IF](https://geekexcel.com/use-if-function-in-microsoft-excel-365-simple-steps/)([INFO](https://geekexcel.com/use-info-function-in-microsoft-excel-365-simple-methods/)(“system”)=”mac”,[CHAR](https://geekexcel.com/how-to-use-char-function-in-microsoft-excel-365/)(13),CHAR(10))**

## Syntax Explanations:

- **IF** – This function helps to return one value for a TRUE result, and another for a FALSE result. Read more on the **[IF function](https://geekexcel.com/use-if-function-in-microsoft-excel-365-simple-steps/)**.
- **INFO** – The Excel **[INFO function](https://geekexcel.com/use-info-function-in-microsoft-excel-365-simple-methods/)** returns information about the current operating environment.
- **CHAR** – In Excel, the [**CHAR Function**](https://geekexcel.com/how-to-use-char-function-in-microsoft-excel-365/) refers to the letters used in a word or a text string.
- **Text** – It represents the input text values.
- **Parenthesis ()** – The main purpose of this symbol is to group the elements.

## Practical Example:

Refer to the below example image.

- First, we will enter the input values in **Column B** , **Column C** , and **Column D**.
- Now we have to join these text values with a line break based on the current OS.

![Input Ranges](https://geekexcel.com/wp-content/uploads/2021/05/Input-Ranges1.png)<figcaption id="caption-attachment-45899">Input Ranges</figcaption>

- Type the above-given formula in **Cell C2** to find the Character value for your current OS.

![Enter the formula](https://geekexcel.com/wp-content/uploads/2021/05/Enter-the-formula-108.png)<figcaption id="caption-attachment-45898">Enter the formula</figcaption>

- Finally, press  **ENTER** to get the result out.
- Now you can refer to the below article to add the line break. **[Excel Formulas to Add a Line Break ~ A Complete Tutorial!!](https://geekexcel.com/excel-formulas-to-add-a-line-break/)**

![Result](https://geekexcel.com/wp-content/uploads/2021/05/Result-100.png)<figcaption id="caption-attachment-45897">Result</figcaption>

## Conclusion:

From this tutorial, you can get some ideas to **add a line break with a formula based on a current OS in Excel**. I hope that this article is helpful. Mention your **queries** in the **comment** box below.

Thank you so much for visiting  **[Geek Excel](https://geekexcel.com/)!! **If you want to learn more helpful formulas, check out [**Excel Formulas**](https://geekexcel.com/excel-formula/) **!! **

### Read Also:

- **[Excel Formulas to Create a Series of Dates by Year ~ Complete Guide!!](https://geekexcel.com/excel-formulas-to-create-a-series-of-dates-by-year/)**
- **[Excel Formulas to Convert Text into Date Format ~ A Complete Tutorial!!](https://geekexcel.com/excel-formulas-to-convert-text-into-date-format/)**
- **[How to Find the Actual Price of the Discounted Price in Excel 365?](https://geekexcel.com/how-to-find-the-actual-price-of-the-discounted-price-in-excel-365/)**
- **[How to Wrap Text Manually in Excel Office 365? {3 Ways}](https://geekexcel.com/how-to-wrap-text-manually-in-excel-office-365-3-ways/)**