I have the following value in a cell:
May 04, 2022 (50bp)
I need only what is in between (
and )
. I was thinking of using =RIGHT()
but I never know how much is inm between the two brackets (so the number of characters I have to give as a parameter to RIGHT()
, will differ.
What is the correct way of handling this in Google Sheets?
CodePudding user response:
Use REGEXEXTRACT()
function.
=REGEXEXTRACT(A1,"\((.*)\)")
CodePudding user response:
To extract the text between any characters, use a formula with the MID and FIND functions despite how much is in between the two brackets.
=MID(A1,FIND("(",A1) 1,FIND(")",A1)-FIND("(",A1)-1)
more information here