Extract text between two strings

Hi everyone.

I’m trying to extract a string that occurs between the same left string, but the right string has 2 possibilities

The bolded string is what I’d like to extract

  1. VAR. 1 - between > and >
    Industry > Banking & Finance > Trading (1.0)

  2. VAR. 2 - between > and (
    Industry > Banking & Finance (1.0)

Thanks a ton for your help.
Subir

Welcome to the community, @Subir_Kumedan! :smiley: Here’s a formula that will do the trick. Replace {FIELD_NAME} with the name of your field:

TRIM(MID(SUBSTITUTE(SUBSTITUTE({FIELD_NAME}, " > ", REPT(" ", 50)), " (", REPT(" ", 50)), 50, 50))

Screen Shot 2020-07-25 at 1.19.30 PM

As long as the piece you want to extract is after the first “>”, this will work. If its position differs based on other conditions, it won’t.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.