The Wayback Machine - https://web.archive.org/web/20250708133440/https://www.geeksforgeeks.org/excel/excel-left-right-mid-len-and-find-functions/
Open In App

Excel LEFT, RIGHT, MID, LEN, and FIND Functions

Last Updated : 02 Jul, 2025
Summarize
Comments
Improve
Suggest changes
Share
Like Article
Like
Report

Mastering Excel functions like LEFT, RIGHT, MID, LEN, and FIND is essential for anyone looking to manipulate and analyze text data effectively. These functions allow you to extract specific parts of text, measure text length, and find the position of characters within a string, making it easier to clean and organize data.

In this guide, we will break down how to use each of these functions, including examples of how to apply them in real-world scenarios. By the end of this article, you'll have a solid understanding of how to use the Excel LEFT, RIGHT, MID, LEN, and FIND functions to streamline your data processing.

LEFT function in Excel

The LEFT function returns a given text from the left of our text string based on the number of characters specified.

Syntax:

LEFT(text, [num_chars])

Parameters:

  • Text: The text we want to extract from.  
  • Num_chars (Optional): The number of characters you want to extract. Default num_chars is 1 and the number must be a positive number that is greater than zero.  

How to use LEFT Function Excel

Here are the steps to use the LEFT function in Excel to extract a specified number of characters from the beginning of a text string.

Step 1: Format your data.

Now if you want to get the first "Geeks" from "Geeksforgeeks" in B2. Let us follow the next step.

String Function in Excel
Format your data.

Step 2: Enter Formula

We will enter =LEFT(B2,5) in the B3 cell. Here we want Excel to extract the first 5 characters from the left side of our text in B2.

String Function in Excel
Enter =LEFT(B2,5)

Step 3: This will return "Geeks".

String Function in Excel
This will return "Geeks"

RIGHT Function in Excel

The RIGHT function returns a given text from the left of our text string based on the number of characters specified.

Syntax:

RIGHT(text, [num_chars])

Parameters:

  • Text: The text we want to extract from.  
  • Num_chars (Optional): The number of characters you want to extract. Default num_chars is 1 and the number must be a positive number that is greater than zero.  

How to use RIGHT Function in Excel

Here are the steps to use the RIGHT function in Excel to extract a specified number of characters from the end of a text string.

Step 1: Format your data.

Now if you want to get the last geeks from "Geeksforgeeks" in B2. Let us follow the next step.

String Function in Excel
Format your data

Step 2: Enter Formula

We will enter =RIGHT(B2,5) in the B3 cell. Here we want Excel to extract the last 5 characters from the right side of our text in B2.

String Function in Excel
Enter Formula

Step 3: This will return "geeks".

String Function in Excel
Geeks Returns

MID function in Excel

The MID function returns the text from any middle part of our text string based on the starting position and number of characters specified.

Syntax:

MID(text, start_num, num_chars)

Parameters:

  • Text: The text we want to extract from.  
  • start_num: The starting number of the first character from the text we want to extract.
  • Num_chars: The number of characters you want to extract.

How to use MID Function in Excel

Here are the steps to use the MID function in Excel to extract a specific number of characters from a text string, starting at any position you choose.

Step 1: Format your data.

Now if you want to get the character "for" which is located in the middle of our text "Geeksforgeeks" in B2. Let us follow the next step.

String Function in Excel
Format your Data

Step 2: Enter Formula

We will enter =MID(B2,5,3) in the B3 cell. Here we want Excel to extract the characters located in the middle of our text in B2.

String Function in Excel
Enter Formula

Step 3: This will return "for"

String Function in Excel
This will return "for"

LEN Function in Excel

The LEN function returns the number of characters in the text strings.

Syntax:

LEN(text)

Parameters:

  • Text: The text we want to know the length

How to use LEN Function in Excel

Here are the steps to use the LEN function in Excel to count the number of characters in a text string, including spaces.

Step 1: Format your data.

Now if you want to know how many characters are in the text "Geeksforgeeks". Let us follow the next step.

String Function in Excel
Format your data.

Step 2: Enter Formula

We will enter =LEN(B2) in the B3 cell. Excel will count how many characters are in the text.

String Function in Excel
Enter Formula

Step 3: This will return 13

String Function in Excel
13 Returns

FIND Function in Excel

The FIND function returns the position of a given text within a text.

Syntax:

FIND(find_text, within_text, [start_num])

Parameters:

  • Find_text: The text we want to find.  
  • Within_text: The text containing our find_text.
  • Start_num (Optional): The starting position of our find_text. Default is 1.  

How to use FIND Function in Excel

Here are the steps to use the FIND function in Excel to locate the position of a specific character or substring within a text string.

Step 1: Format your data

Now if you want to find “for” in geeksforgeeks in B2. Let us follow the next step.

String Function in Excel
Format your Data

Step 2: Enter Formula

We will enter =FIND("for",B2) in B3 cell. Here we want Excel to find “for” in our text in B2.

String Function in Excel
Enter Formula

Step 3: This will return 6 because “for” is located at character number 6 in our text

find2
6 Returns

Conclusion

Now that you're familiar with how to use the Excel LEFT, RIGHT, MID, LEN, and FIND functions, you can leverage these tools to manipulate and extract text data with ease. Whether you're working with long strings of data, cleaning up lists, or performing text analysis, these functions can greatly improve your efficiency. By mastering these essential Excel functions, you'll be able to manage text-based data more effectively and perform complex data tasks with greater accuracy.


Next Article

Similar Reads