Skip to Content

How to Extract a Substring in Google Sheets (Using Formulas)

In the vast landscape of spreadsheets, Google Sheets stands tall as a dynamic tool that empowers users to analyze data, streamline workflows, and visualize insights. Yet, amidst the sea of information, there often arises the need to isolate specific segments of text, revealing essential details concealed within. 

Imagine having a column of intricate URLs, but all you require are the domain names or a string of text containing critical timestamps, and the challenge is to extract only the dates.

The power of substring extraction in Google Sheets is the key to unlocking these hidden treasures.

By harnessing the prowess of a few simple formulas, you can seamlessly wield the ability to carve out and present desired subsets of data precisely.

Today’s guide will show you how to extract a substring in Google Sheets. Whether you’re a spreadsheet wizard or this is your first time attempting to extract a substring in Google Sheets, rest assured that this comprehensive guide will show you the step-by-step process of extracting substrings in Google Sheets.

But before we delve any further, let’s look at a unique use case scenario that might require you to extract a substring in Google Sheets.

Use Case or Scenario

Meet Sarah, an event organizer who has meticulously compiled a list of participant email addresses for an upcoming conference. However, the email addresses are of the form “firstname.lastname@emailprovider.com,” and Sarah’s task is to create a personalized email greeting using just the first names. Manually copying each first name is a Herculean feat destined for errors, frustration, and a potential bout of keyboard-induced carpal tunnel syndrome.

This is where the substring extraction technique rides in on a white horse. Sarah can effortlessly pluck out those elusive first names by employing the right formulas in Google Sheets, saving her time and sanity. With a few clicks and keystrokes, she’ll transform a seemingly insurmountable task into a triumph of efficiency.

In the next sections of this article, we’ll break down the steps Sarah (and you) need to take to conquer the art of substring extraction in Google Sheets using formulas.

What is a substring, and why do you need to extract it?

You must understand the basics before we show you how to extract a substring in Google Sheets. Part of that basics is knowing exactly what a substring is. Hold on tight as we attempt to explain exactly what a substring is. 

Imagine your spreadsheet cells as treasure chests filled with letters, numbers, and symbols. Now, picture a key that can unlock just a part of the treasure—a secret snippet with valuable information. This key is what we call a “substring.” 

Simply put, a substring is a tiny piece of text hidden within a cell’s content. It’s like finding a hidden message within a larger story.

What’s a String?

Before we dive deeper, let’s understand “strings.” Think of them as the entire content inside a cell—letters, numbers, symbols, and spaces. Strings could be anything from names like “Alice” to numbers like “12345.” They’re like the words and numbers you write in your spreadsheet.

Examples of Substrings

Let’s say we have a string like “Summer Vacation.” Imagine you have a magical pair of scissors that can snip out parts of this string. What you snip out are substrings. So, from “Summer Vacation,” you could snip out:

  • Summer: Snipping out the first part.
  • Vacation: Snipping out the second part.
  • S: Just snipping a single letter.
  • mer Vac: Snipping out a mix of letters from the middle.

You can snip out any combination you like. These substring snippets can be super handy.

Why Snip Substrings? 

Snipping substrings isn’t just fun; it’s useful too. Imagine you have a long list of email addresses and want to know which ones come from a specific company. You can easily find the ones you’re looking for by snipping out parts of the email addresses. It’s like sorting a jumbled puzzle.

Making Things Simple

Remember, substrings are like secret codes hiding in plain sight within your cells. By learning to extract a substring in Google Sheets, you can solve puzzles and simplify your spreadsheet tasks. Whether searching for specific info or organizing data neatly, substrings are your trusty tools for the job.

In today’s Google Sheets tutorial covering how to extract a substring in Google Sheets, we’ll embark on an adventure to discover how to snip substrings in Google Sheets. With a few simple tricks, you’ll unveil these hidden gems and become a spreadsheet superhero.

What are the methods for extracting a substring in Google Sheets?

In Google Sheets, you can extract numbers from a mix of text using specific functions. Although Google Sheets doesn’t provide a direct button that allows you to extract a substring in Google Sheets, you can achieve it using three essential functions: LEFT, RIGHT, and MID. Here’s how they work:


LEFT Function: This is one of the easiest ways to extract a substring in Google Sheets. This function allows you to extract characters from the beginning (left) of a cell’s content. Think of it like reading the first few words of a sentence. You specify how many characters you want to extract.

Example: If you have the text “Revenue: $5000” in a cell, you can use the LEFT function to pull out “Revenue” by specifying that you want to extract the first 7 characters.


RIGHT Function: Similar to LEFT, but you’re taking characters from the end (right) of the cell’s content this time. Imagine reading the last few words of a paragraph. You still decide the number of characters to extract.

Example: If you have the text “Product Code: ABC123” in a cell, you can use the RIGHT function to extract “ABC123” by specifying that you want to take the last 6 characters.


MID Function: This function is more versatile. It lets you extract characters from any position within the cell’s content. You specify both the starting point (character number) and how many characters you want to extract.

Example: If you have the text “Date: 2023-08-10” in a cell, you can use the MID function to extract “2023” by specifying that you want to start from the 6th character and extract 4 characters.


These functions are incredibly useful when extracting specific information like numbers, words, or characters from cells in Google Sheets. They work well with various types of content, including numbers, letters, spaces, and special characters.

Mastering the Syntax: Extracting Substrings with Precision

To understand how these functions work, let’s break down their syntax. Don’t worry if it seems complex at first—once you see examples, it’ll become clearer.

  • LEFT(string, number_of_characters): This function pulls characters from the beginning (left) of a text, and you tell it how many characters to take.
  • RIGHT(string, number_of_characters): Similar to LEFT, but it grabs characters from the end (right) of the text.
  • MID(string, starting_point, number_of_characters): This function starts picking characters from a specific position (starting point) within the text, and you decide how many characters to extract.

Remember, these functions also pay attention to spaces and special characters in the text.

Now, how can you use these functions together? Imagine you want to grab information from different parts of a text and put them together. You use another function called CONCATENATE to do this.

Here’s an example of how you might use CONCATENATE along with the functions we talked about:

How to use the LEFT function to extract a substring in Google Sheets

Having extensively covered everything you need to know on how to extract a substring in Google Sheets, it’s time to go over some practical steps together. Our first example will show you how to extract a substring in Google Sheets using the left function. 

Let’s dive right in, shall we?

For this example, we will use the following sample data: 

Here is how to go about it: 

Step 1: Select the cell where you want to extract the substring to

Let’s start by picking the cell where we want our extracted substring to appear. In this case, we’ll use cell C2. So, go ahead and click on or choose that cell within our spreadsheet.

Step 2: input the LEFT function formula

Once you’ve selected the cell where you want the extracted substring to appear, it’s time to put in the formula for the LEFT function. Here’s what you need to do:

  • Head over to the formula bar at the top.
  • Type in this formula exactly: 

This formula tells the computer to use the LEFT function on the content of cell A1 and grab the first 7 characters. The result will show up in the cell you selected earlier.

How to Extract a Substring in Google Sheets Using the LEFT function

Step 3: Hit Enter

Once you’ve typed in the formula, as we explained before, you’re almost done. Just press the “Enter” key on your keyboard. When you do this, Google Sheets will do its magic and pull out the part of the text you wanted.

Here’s what it should look like in our example:

Note: In the picture above, we picked cell A1 and told Google Sheets to grab 7 characters. The result is that Google Sheets took the first 7 letters from the left, making up the word “welcome.”

How to use the RIGHT function to extract a substring in Google Sheets

Now that you know how to extract a substring in Google Sheets using the LEFT function, let’s quickly show you how to use the RIGHT function to extract a substring in Google Sheets. We will use the same sample data we used in the previous example: 

Here is how to go about it:

Step 1: Choose the cell where you want the result generated 

To begin, select the cell where you want the extracted part of the text to appear. For this example, we’ll use cell C2. 

Step 2: Enter the RIGHT function formula

After choosing the cell where you want the result generated, head over to the formula bar and type in the following formula: 

How to Extract a Substring in Google Sheets Using the RIGHT function

Step 3: Hit Enter

After typing in the formula we showed you above, you only need to hit the Enter button on your keyboard. Google Sheets will automatically generate the part of the text you want. 

Here is what our spreadsheet looks like: 

Note: In the image above, we picked A1 again and put in 22 for the number of characters. This time, Google Sheets grabbed the last 22 characters, making up the phrase “plenty places to visit.”

How to use the MID function to extract a substring in Google Sheets

Having covered the first two functions to show you how to extract a substring in Google Sheets, let’s now show you how to use the MID function to extract a substring in Google Sheets. We will use the same sample for the other examples we have covered. 

Here are the steps to take

Step 1: Choose the cell where you want the substring generated

To start with, select the cell where you want the result of the substring generated. For this example, we will use cell C3. So go ahead and select that cell. 

Step 2: Type in the MID function formula

With the cell where we want our substring extracted to now selected, we now need to type in our MID function formula. To do that, head over to the formula bar and type in the following formula: 

Step 3: Hit Enter 

Finally, hit the Enter button on your keyboard. Google Sheets should automatically generate the substring result in our selected cell. Here is what ours looks like: 

How to use the CONCATENATE function to extract a substring in Google Sheets

Remember we mentioned that you can use the CONCATENATE function to extract a substring from different cells in Google Sheets. Well, here is how to go about it. 

And yes, we will use the same sample data we have used. 

Let’s get started. 

Step 1: Choose the cell where you want the result generated

First things first, select the cell where you want the result generated. For this example, we will use cell C2. 

Step 2: Type in your CONCATENATE Function

Now, type in the CONCATENATE formula in the selected cell. To do that, navigate to the formula bar and type in the following formula: 

Step 3: Hit Enter

Finally, hit the Enter button on your keyboard, and Google Sheets will automatically generate the substring in the selected cell. 

Here is what ours looks like: 

Note: In the picture above, we combined the CONCATENATE and MID functions to pull out a specific piece of text from the mix of words in cells A3 and A4.

This trick is helpful because it lets you grab parts of text from more than one cell or even from different parts of the same cell. And guess what? You can also use the LEFT and RIGHT functions together with the CONCATENATE function.

Final Thoughts 

Now that we’ve gone through everything you need to know about how to extract a substring in Google Sheets, we know you now have a better idea of how this feature works. 

Even though Google Sheets might not have a direct button for this, don’t worry. There’s a way to do it by combining a few functions we discussed in today’s post. 

So, while it might seem a bit tricky at first, remember there’s a way to make it work. We hope you found this article useful. Catch you in the next one.