Blog

How to Evaluate Formulas Step by Step in Microsoft Excel

Excel 2021 Wallpaper HD - GGKEYS

Extracting a substring in Microsoft Excel depends on where the text is located in the cell. Excel provides functions like LEFT, RIGHT, MID, LEN, and FIND to help extract specific portions of text.

1. Extract Text from the Left

Use the LEFT function along with FIND to extract all text before a specific character.

Formula:

excelCopyEdit=LEFT(B2, FIND("@", B2) - 1)

How It Works:

  • FIND("@", B2) finds the position of @ in cell B2.
  • LEFT(B2, FIND("@", B2) - 1) extracts everything before @.

Example:

A (Full Text)B (Extracted Text)
[email protected]john

2. Extract Text from the Right

Use the RIGHT function along with LEN and FIND to extract text after a specific character.

Formula:

excelCopyEdit=RIGHT(B2, LEN(B2) - FIND("@", B2))

How It Works:

  • FIND("@", B2) finds the position of @.
  • LEN(B2) gets the total length of the text.
  • RIGHT(B2, LEN(B2) - FIND("@", B2)) extracts everything after @.

Example:

A (Full Text)B (Extracted Text)
[email protected]example.com

3. Extract a Substring from the Middle

Use the MID function to extract a specific number of characters from a text.

Formula:

excelCopyEdit=MID(B2, 1, 3)

How It Works:

  • B2 is the text.
  • 1 is the starting position (1st character).
  • 3 is the number of characters to extract.

Example:

A (Full Text)B (Extracted Text)
MicrosoftMic

Summary

FunctionUse CaseExample
LEFTExtract text before a characterLEFT(B2, FIND("@", B2) - 1)
RIGHTExtract text after a characterRIGHT(B2, LEN(B2) - FIND("@", B2))
MIDExtract text from the middleMID(B2, 1, 3)

With these functions, you can easily extract names, domains, codes, or any part of a string in Excel!

Unlock powerful features with a genuine Office 2021 Professional Plus Key – get the best deal at the lowest price today!

Leave a Reply

Your email address will not be published. Required fields are marked *