Step-by-Step Guide: Cutting Out Text Segments Using Microsoft Excel

Step-by-Step Guide: Cutting Out Text Segments Using Microsoft Excel

Michael Lv11

Step-by-Step Guide: Cutting Out Text Segments Using Microsoft Excel

If you want to extract a substring from the left, right, or middle of your text, you can use Microsoft Excel’s

    `LEFT`

, RIGHT, MID, LEN, and FIND functions to do that. We’ll show you how.

Which Method to Use for Substring Extraction?

What method to use to extract a substring depends on where your substring is located.

To extract a string from the left of your specified character, use the first method below. To extract everything that’s to the right of your specified character, use the second method below. To extract a string from the middle of your text, use the third method below.

Related: 12 Basic Excel Functions Everybody Should Know

Get the String To the Left of Your Text

If you’d like to get all the text that’s to the left of the specified character in your cell, use Excel’s

    `LEFT`

and FIND functions to do that.

First, open your spreadsheet and click the cell in which you want to see the result.

Select a cell.

https://techidaily.com

In your selected cell, type the following function. In this function, replace B2 with the cell where your full text is and @ with the search character. The function will retrieve the entire string to the left of this character.

Then press Enter.

=LEFT(B2,FIND(“@”,B2)-1)

Use the LEFT function.

Your selected cell will display the result of the function, which is the full text before your specified character in your cell.

The result of the LEFT function.

You’re all set.

https://techidaily.com

Extract the String to the Right of Your Text

To get all the text that’s to the right of the specified character in your cell, use Excel’s RIGHT , LEN , and FIND functions.

Start by launching your spreadsheet and clicking the cell in which you want to see the result.

Choose a cell.

In the selected cell, enter the following function . In this function, replace B2 with the cell where your full text is and @ with the search character. Excel will extract the entire string to the right of this character.

Then press Enter.

=RIGHT(B2,LEN(B2)-FIND(“@”,B2))

Type the RIGHT function.

You’ll see the result of the function in your chosen cell.

The result of the RIGHT function.

https://techidaily.com

You’re done.

Related: 13 Essential Excel Functions for Data Entry

Obtain a String From the Middle of Your Text

If you’d like to extract a string containing a specific number of characters located at a certain position in your cell, use Excel’s MID function.

In your spreadsheet, select the cell where you want to display the resulting string.

Click a cell.

In the selected cell, enter the following function. In this function, replace B2 with the cell where you have the full text, 1 with the position of the character where you want to start the string selection, and 3 with the number of characters you want to extract.

Then press Enter.

=MID(B2,1,3)

Enter the MID function.

https://techidaily.com

Excel will extract the specified number of characters from the given position in your cell.

The result of the MID function.

https://techidaily.com

And that’s all there is to it.


Like this, you can also count the number of cells with text in your Excel spreadsheets. Check out our guide to learn how.

Related: How to Count Cells With Text in Microsoft Excel

Also read:

  • Title: Step-by-Step Guide: Cutting Out Text Segments Using Microsoft Excel
  • Author: Michael
  • Created at : 2024-09-25 17:01:38
  • Updated at : 2024-10-01 17:02:07
  • Link: https://win-forum.techidaily.com/step-by-step-guide-cutting-out-text-segments-using-microsoft-excel/
  • License: This work is licensed under CC BY-NC-SA 4.0.