Excel Formula: Combine cells with line break
In Excel, sometimes, you may want to combine cells into one cell with line break as below screenshot shown. Here, in this tutorial, it introduces two formulas to solve this task with examples.
|Text_1,Text_2, Text_n: the text strings you want to combine into one cell.|
|CHAR(10): the character code 10 which represents line break in Excel.|
How this formula work
For instance, combine cell B2, C2 and D2 into one cell with line break. Using the formula:
Press Enter key, then select the formula cell, and click Home > Wrap Text, then the cell B2, C2 and D2 are combined into one cell with line breaks.
The CONCATENATE function is used to combine multiple values into one cell.
In different office systems, the line break punctuation is represented by different character codes. In Windows is the CHAR(10), but in Mac system, is the CHAR(13).
If you want to add line break by OS (Office System), you just need one step before using above formulas.
In a blank cell, cell B1, type this formula
This formula will adjust the line break character according to the environment you work.
Then in the cell you want to place the combined result, for instance, cell E4, just type the formula
B4, C4 and D4 are the text strings you want to combine, the B1 is the cell containing the IF(INFO) formula.
- Count cells equal to
With the COUNTIF function, you can count cells that equal to or not contain a specified value.
- Count cells that equal to x or y
In some times, you may want to count the number of cells that meet one of two criteria, in this case, you can use the COUNTIF function.
- Check if cell contains one of things
Supposing in Excel, there is a list of values in column E, you want to check if the cells in column B contain all of the values in column E, and return TRUE or FALSE.
- Check if cell contains number
Sometimes, you may want to check if a cell contains numeric characters. This tutorial provides a formula which will return TRUE if the cell contains number, FALSE if cell does not contain number.