Is there a function in Google Sheets similar to Excel's Replace for text removal?

I’m working with a spreadsheet that has employee names mixed with extra info. Here’s what the data looks like:

John Doe tag× marketing×
Jane Smith tag× finance×
Bob Brown tag× IT×

I want to keep just the names and get rid of everything from ‘tag×’ onwards. In Excel, I’d use a Replace function like this:

Selection.Replace What:=\"tag×*\", Replacement:=\"\"

But now I’m using Google Sheets and can’t find a similar option. I tried looking into replaceText(), but it seems to be for the Document Service, not Spreadsheet App.

Does anyone know how to do this in Google Sheets? Is there a built-in function or a script I could use to clean up this data? I’d really appreciate any help or suggestions!

For your specific situation, I’d recommend using the REGEXEXTRACT function in Google Sheets as an alternative. It effectively isolates the portion of text you need. For example, you can use:

=REGEXEXTRACT(A1, “[1]+”)

This formula captures everything before ‘tag×’ in each cell. Enter it next to your data, drag it down to fill the column, and finally copy and paste the values to fix the result. This approach has proven efficient and reliable in my own experience with data cleaning.


  1. ^tag× ↩︎

hey there! u can use the REGEXREPLACE function in Sheets to do this. try something like:

=REGEXREPLACE(A1, “tag×.*”, “”)

this should strip everything from ‘tag×’ to the end. hope it helps! lemme know if u need more info

I’ve dealt with similar data cleanup tasks in Google Sheets before. While REGEXREPLACE is a solid option, I prefer using the SPLIT function for this particular case. It’s simpler and doesn’t require regex knowledge.

Here’s what I’d do:

=SPLIT(A1, “tag×”)

This splits the text at “tag×” and returns only the first part (the name) in the cell. You can drag this formula down for all your entries.

If you have a lot of data, you might want to paste the results as values afterwards to prevent recalculation issues. Just copy the column with the SPLIT results, then Paste Special > Paste values only.

This method has worked well for me in similar situations. It’s straightforward and gets the job done efficiently.