Function Problems

Remove the First 13 Lines from Excel Cells

Kushani NimanthikaKushani Nimanthika Nov 18, 2026 869 views

Question details

Remove the first 13 lines from each multiline cell in column B while keeping the remaining text and line breaks.

Remove the First 13 Lines from Multiline Excel Cells
Product
Microsoft Excel for Microsoft 365
Device & OS
not provided
Scenario
A worksheet contains multiline text in column B that needs to be shortened consistently.
Observed behavior
The desired result is the text after the 13th line break in each cell, with subsequent line breaks preserved.
Before you start

Identify the first data row in column B and choose an empty helper column for the results. The formula assumes the lines are separated by line feeds, such as those inserted with Excel's in-cell line break shortcut.

Solution 1Recommended

Use TEXTAFTER to remove the first 13 lines

Use this Microsoft 365 formula to extract everything after the 13th line break in each cell.

1
Enter the formula

In an empty cell such as C1, enter =TEXTAFTER(B1,CHAR(10),13). If your first data row is different, replace B1 with the corresponding cell.

2
Fill down

Select C1 and drag its fill handle down alongside the populated cells in column B.

3
Replace the original text if needed

Copy the results in column C, select the first destination cell in column B, and choose Home > Paste > Values. You can then delete the helper column.

4
Show the remaining lines

Select the result cells and choose Home > Wrap Text to display the preserved line breaks.

Use TEXTAFTER to remove the first 13 lines
Cells with fewer line breaks: TEXTAFTER returns #N/A if a cell has fewer than 13 line feeds. To return an empty result instead, use =IFNA(TEXTAFTER(B1,CHAR(10),13),"").
WPS Spreadsheet

Remove the First 13 Lines in WPS Spreadsheet

Use a helper-column formula in WPS Spreadsheet to extract text after the 13th line feed, then paste the results as values if you want to replace the originals.

  1. 1. Open the workbook: Open your Excel workbook in WPS Spreadsheet and locate the multiline cells in column B.
  2. 2. Enter the formula: In an empty cell such as C1, enter =IFERROR(MID(B1,FIND(CHAR(1),SUBSTITUTE(B1,CHAR(10),CHAR(1),13))+1,LEN(B1)),""). Adjust B1 if your data starts on another row.
  3. 3. Fill the column: Select C1 and drag the fill handle down for all rows you want to process. Select the results and turn on Wrap Text to see the remaining lines.
  4. 4. Paste values: If you want to replace column B, copy the helper-column results and use Paste Special > Values on the corresponding cells in column B.
Preserves the line breaks after the first 13 linesOpens and saves Microsoft Excel XLSX filesProvides familiar spreadsheet formulas and fill controlsFree to use for everyday spreadsheet tasks
microsoft office alternative - wps office

Frequently Asked Questions

Why does the Excel formula return #N/A?

The cell may contain fewer than 13 line feeds. Use =IFNA(TEXTAFTER(B1,CHAR(10),13),"") to return an empty result when the 13th line feed is absent.

How do I keep the remaining line breaks visible?

Select the result cells and choose Home > Wrap Text. The formula preserves line feeds after the 13th one, but wrapping may be needed to display them on separate lines.

Can I replace the original cells without keeping the formulas?

Yes. Copy the helper-column results, select the matching cells in column B, and choose Home > Paste > Values in Excel.

What does CHAR(10) represent in the formula?

CHAR(10) represents a line feed. TEXTAFTER uses the 13th occurrence as the boundary and returns the text that follows it.