Help

Re: Parse a string with separation

Solved
Jump to Solution
360 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Belgana_France
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello guys,

I have this string : DECO > OBJET DECO > AUTRE OBJET DECO
and I would like only : AUTRE OBJET DECO
so only what is after the second >.

I tried with :
RIGHT( {Catégorie}, FIND( “>”, {Catégorie} ) -1 )

RESULT was " DECO" (The last 5 characters)

I really don’t understand why only the last 5 characters.

1 Solution

Accepted Solutions
Jason
Airtable Employee
Airtable Employee

Hi @Belgana_France,

You’re getting that result because the formula is actually finding the first instance of >, not the last one. I would recommend using the MID function like the following:

MID(
   {Catégorie},
      FIND(
         ">",{Catégorie},
         FIND(
            ">", {Catégorie}
         )+1
      )+2,
   500
)

This formula uses one FIND function to identify the first instance of >, while the second function uses that location (+1) as the starting point for the MID function. The 500 at the end is how many characters you want to return after >; it’s just set arbitrarily high to account for longer text strings, so you can adjust as needed.

See Solution in Thread

1 Reply 1
Jason
Airtable Employee
Airtable Employee

Hi @Belgana_France,

You’re getting that result because the formula is actually finding the first instance of >, not the last one. I would recommend using the MID function like the following:

MID(
   {Catégorie},
      FIND(
         ">",{Catégorie},
         FIND(
            ">", {Catégorie}
         )+1
      )+2,
   500
)

This formula uses one FIND function to identify the first instance of >, while the second function uses that location (+1) as the starting point for the MID function. The 500 at the end is how many characters you want to return after >; it’s just set arbitrarily high to account for longer text strings, so you can adjust as needed.