How to Easily Remove Unwanted Characters in Google Sheets

Have you ever found yourself needing to clean up text strings in Google Sheets by removing the first few characters? Perhaps you want to extract specific information from a cell or multiple columns. Well, don’t fret! In this article, we’ll explore different functions that can help you achieve this task effortlessly in Google Sheets.

The Power of Google Sheets Functions

To remove the first N characters in a single cell or a batch of cells in one or multiple columns, you have a few reliable options to choose from. Let’s dive into some Google Sheets functions that will make your life easier:

  • SUBSTITUTE: This function allows you to replace specific text within a cell.
  • REPLACE: With this function, you can replace a certain number of characters in a cell with new content.
  • REGEXREPLACE: Perfect for advanced users, this function uses regular expressions to replace text.
  • RIGHT: This function extracts a specified number of characters from the right side of a cell.
  • MID: Similar to RIGHT, this function extracts characters based on a specific starting point.

These functions will come in handy when you need to remove unwanted text from the left side of a cell. Additionally, combining the RIGHT function with the LEN function can be particularly useful.

Removing the First N Characters in a Single Cell

Let’s say you have a cell (A1) with the value “Mr. John,” and you only want to extract the name without the title. Lucky for you, we have multiple formulas you can use in Google Sheets!

Formula 1 (Works in Excel and Google Sheets):

=right(A1,len(A1)-4)

Formula 2 (Works in Excel and Google Sheets):

=SUBSTITUTE(A1,"Mr. ","")

Formula 3 (Works in Excel and Google Sheets):

=replace(A1,1,4,"")

Formula 4 (Works in Google Sheets Only):

=REGEXREPLACE(A1,"Mr. ","")

Formula 5 (Works in Excel and Google Sheets):

=mid(A1,5,9^9)

In the last formula, even though you want to remove 4 characters, you’ll use 5 in the formula. The 9^9 represents a large number, so use it as is.

Removing the First N Characters in a Single Column

To remove the first N characters in an entire column, you can convert some of the previous formulas into array formulas. Here’s an example:

Apply the following formula in cell B1 to remove the title “Mr.” or “Ms.” from the names in column A:

=ArrayFormula(right(A1:A10,len(A1:A10)-4))

Alternatively, you can use any of the following array formulas:

Array Formula 1:

=ArrayFormula(replace(A1:A10,1,4,""))

Array Formula 2:

=ArrayFormula(mid(A1:A10,5,9^9))

Removing the First N Characters in Multiple Columns

Similar to the previous examples, you can use the MID, RIGHT, or REPLACE functions to remove the first N characters in multiple columns in Google Sheets. Here’s an example using the REPLACE function:

=ArrayFormula(replace(A1:B10,1,3,""))

Feel free to experiment with the other two formulas as well.

That’s it! Now you’re equipped with the knowledge to effortlessly remove unwanted characters in Google Sheets using different functions. If you want to explore more tips and tricks, check out Crawlan.com.

Remember, with Google Sheets and the right functions, you can conquer any data cleaning challenge!

Related posts