Excel Formulas to Get the Last Line in a Cell ~ A Complete Guide!!
Tags: excelformula, excelformulas
Published: 2021-06-19 08:37:41

---
title: Excel Formulas to Get the Last Line in a Cell ~ A Complete Guide!!
published: true
date: 2021-06-11 06:30:03 UTC
tags: ExcelFormula,Excelformulas
canonical_url: https://geekexcel.com/excel-formulas-to-get-the-last-line-in-a-cell/
---

Sometimes you may need to extract the last line of a cell. Do you have any good methods for solving this task in Excel? So here I will introduce you to some quick tricks to **get the last line of a cell in Excel**. Let’s get started!! 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)

[![Get the last line in a cell](https://geekexcel.com/wp-content/uploads/2021/06/Get-the-last-line-in-a-cell.png)](https://geekexcel.com/excel-formulas-to-get-the-last-line-in-a-cell/get-the-last-line-in-a-cell/#main)<figcaption id="caption-attachment-46338">Get the last line in a cell</figcaption>

## Generic Formula:

- Use the below formula to find out the last line of the cell in Excel.

**=[TRIM](https://geekexcel.com/use-trim-function-in-microsoft-excel-2013-simple-methods/)([RIGHT](https://geekexcel.com/how-to-use-right-function-in-microsoft-excel-365/)([SUBSTITUTE](https://geekexcel.com/how-to-use-substitute-function-in-microsoft-excel-2013/)(A1,[CHAR](https://geekexcel.com/how-to-use-char-function-in-microsoft-excel-365/)(10),[REPT](https://geekexcel.com/how-to-use-rept-function-in-microsoft-excel-2013/)(” “,200)),200)) **

## Syntax Explanations:

- **TRIM** – This function removes the extra spaces from the text and there is no space at the start or end of the text string. Read more on the [**TRIM function**](https://geekexcel.com/use-trim-function-in-microsoft-excel-2013-simple-methods/).
- **RIGHT** – In Excel, the [**RIGHT function**](https://geekexcel.com/how-to-use-right-function-in-microsoft-excel-365/) helps to extract the texts with the given number of characters from the right side.
- **SUBSTITUTE**  – This function helps to replace existing text with new text in a text string when you want to replace text based on its content, not position. Read more on the [**SUBSTITUTE function**](https://geekexcel.com/how-to-use-substitute-function-in-microsoft-excel-2013/).
- **CHAR** – This function is used to get a character by a specified number. Read more on the [**CHAR function**](https://geekexcel.com/how-to-use-char-function-in-microsoft-excel-365/).
- **REPT** – The **[REPT function](https://geekexcel.com/how-to-use-rept-function-in-microsoft-excel-2013/)** will help to repeat characters a given number of times.
- **A1** – It represents the input value.
- **Comma symbol (,)** – It is a separator that helps to separate a list of values.
- **Parenthesis ()** – The main purpose of this symbol is to group the elements.

## Practical Example:

Let’s consider the below example image.

- First, we will enter the input text strings in **Column B**.
- Here we need to find out the last line of the cell.

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

- Select any cell and type the above-given formula.

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

- Finally, press the ** ENTER** key, you can get the result as shown below.

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

## Verdict:

Hope you like this article on how to **get the last line of the cell in Excel**. Let me know if you have any **doubts** regarding this article or any other Excel/VBA topic.

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/) **!! **

### Related Articles:

- **[Excel Formulas to Find the Nth Occurrence of Character ~ Simple Tricks!!](https://geekexcel.com/excel-formulas-to-find-the-nth-occurrence-of-character-simple-tricks/)**
- **[Excel Formulas to Count specific word in a range ~ Easy Tutorial!!](https://geekexcel.com/excel-formulas-to-count-specific-words-in-a-range/)**
- **[Formulas for Extracting Substring Between Two Texts in Excel 365!!](https://geekexcel.com/formulas-for-extracting-substring-between-two-texts-in-excel-365/)**
- **[Excel Formulas to Get the First Word of a Text ~ Useful Guide!!](https://geekexcel.com/excel-formulas-to-get-the-first-word-of-a-text/)**