Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove characters in Googlesheets

I want to remove the first and last characters of a text in a cell. I know how to remove just the first or the last with formulas such as =LEFT(A27, LEN(A27)-1) but i want to combine two formulas at the same time for first and last character or maybe there is a formula that I'm not aware of which removes both (first and last characters) at the same time.

I know about Power Tool but i want to avoid using this tool and I'm trying to realize this simply by formulas.

like image 996
John Grischam Avatar asked Jan 24 '26 23:01

John Grischam


1 Answers

You could use the REGEXREPLACE() function:

=REGEXREPLACE(A27, "^.|.$", "")

The regular expression used here matches:

  • ^. the first character after the start of the string
  • | OR
  • .$ the last character of the string
like image 153
Tim Biegeleisen Avatar answered Jan 26 '26 18:01

Tim Biegeleisen