How to extract the first or last line from a multi-line cell in Excel?
If there are multi-line texts in a cell, now, you want to extract and copy the first or the last line text from the cell as following screenshot shown. How could you deal with this job quickly and easily in Excel?
To copy and paste the first line text from the multi-line cell, please apply the below formula:
Enter this formula into a blank cell where you want to output the result:
And then, drag the fill handle down to the cells that you want to apply this formula, all first line text contents have been extracted at once, see screenshot:
If you want to extract the last line text from the cell, please apply the following formula:
Enter or copy the below formula into a blank cell:
And then, drag the fill handle down to the cells that you want to apply this formula, all last line text contents have been extracted as following screenshot shown:
Here, you can also extract each line text from the multi-line cells into separate cells. Kutools for Excel’s Split Cells feature can help you to solve this task as quickly as possible.
After installing Kutools for Excel, please do as this:
1. Select the range of cells that you want to use, and then click Kutools > Text > Split Cells, see screenshot:
2. In the Split Cells dialog box, select Split to Columns from the Type section, and then choose New line from the Split by section, see screenshot:
3. Then, click Ok button, and in the following prompt box, select a cell to output the result, see screenshot:
4. And then, click OK button, and each line text has been extracted to separate cells as below screenshot shown:
More relative extract words or characters articles:
- Extract First Two Or N Words From Text String
- If you have a list of text strings which are separated by space, and now, you want to extract first three or n words from the cell value to get the following screenshot result. This article, I will introduce some formulas to extract first two or n words from text string in Excel.
- Extract First / Last / Nth Word From Text String In Excel
- Have you ever suffered with the problem that you need to extract a certain word from the text string in a worksheet? For example, you have the following range of text strings needed to get the first/last or nth word from them, here I can talk about some effective ways for you to solve it.
- Extract Last Number From Text String In Excel
- Supposing, you have a list of text strings which mixed with texts and numbers, now, you need to extract the last set of numbers as following screenshot shown. How could you handle this job in Excel?
- Pull Or Extract Characters From Right To Left In A Cell Until A Space Is Reached
- This article will talk about pulling or extracting characters from right in a cell until a space is reached to get the following result in Excel worksheet. A useful formula in this article can solve this job quickly and easily.
- Extract Text Between Commas/Brackets/Parentheses In Excel
- If you have a list of data, and you want to extract the data between the commas/brackets/parentheses only in Excel, just like below screenshot shown, you can follow the steps this tutorial introduces to solve it.