Remove Specific texts from Cells in Google Sheets

Sometimes we need to remove a specific text or texts from a long list. It can be done easily with any spreadsheets like Google Sheets or MS Excel. So the first thing you do is to copy the list in a spreadsheet of your choice.

Google Sheets is more convenient for me as Digital Marketer. So, here I will show you how to do it in Google Sheets. 

With this method, you can remove a prefix, or a suffix, or any other word from cells or list. That means your list contains one or more specific words in each cell. And you want to remove that from all the cells.

Let me illustrate the problem with an example.

So here, I have a list like this
Remove Specific texts from Cells in Google Sheets
Remove Specific texts from Cells in Google Sheets 
















I want to remove the "Lecture" and "30 min" from the entire list.


Here is How to Remove Specific Texts from a String using Google Sheets 


You have to use a regex formula to do it.

The formula for removing text from specific websites

=Regexreplace(NX,"ABC","XYZ")

This is a regex replace function, you use it for replacing a text in a string in Google Sheet with another text. In the above formula
  • NX - is the cell, on you want to apply the formula, in my case, it was the cell with "Lecture1.1 Introduction 30 min" - this text which was the first cell on the list (C5)
  • ABC - It is the word you want to remove. In my case, it was "Lecture" and "30 min"
  • XYZ - is the word you want to replace with. In my case, I just want to get rid of the words ("Lecture" and "30 min") completely. I want to replace them with nothing. 
The Formula I applied is
=Regexreplace(C5,"Lecture","")










I got rid of "Lecture" word. Then just applied it to the entire column by selecting the newly created cell, which was D5, with "Lecture" removed, then just dragged the selection to the column.

Next time, I selected the cell D5 and applied the formula - 
=Regexreplace(D5,"30 min", ""), to remove "30 min". And selcted 












So here's you have it. This how you can save time removing some word from an extremely long list.


Video Tutorial:


And this also works for removing prefix or suffix if the prefix or suffix is the same words in all the cells. But if the prefix or suffix is not the same in all the cells, then you have to use the trim function to trim the first or the last word of the cells. A guide on that is coming soon.






Post a Comment

0 Comments