Forum Discussion

Gaurav Sethi's avatar
Gaurav Sethi
Copper Contributor
Aug 03, 2018
Solved

Split string at particular word. (space+word+space)

Hello all:

 

I have a column in Excel that contains person's title and company name separated by " at ". I tried to split with text to column with left most and right most occurrence but could not succeed as title or company name may also have at in their word. And I also checked " at " (giving space before and after at) but didn't work.

 

State Head at Sanofi International
Head Real Estate at United Builders
Business Unit Head at Lilly

 

Could you please help me out.

 

Appreciate your time.

 

Regards

G

  • SergeiBaklan's avatar
    SergeiBaklan
    Aug 03, 2018

    Guarav, in your texts there is symbol CHAR(160) instead of space. You may use

    =IFERROR(LEFT(A31,SEARCH(CHAR(160)&"at"&CHAR(160),A31)),A31)

    for the left part, for the right one the formula is the same, attached.

    Alternatively you may SUBSTITUTE that symbol on spaces.

5 Replies

    • Gaurav Sethi's avatar
      Gaurav Sethi
      Copper Contributor

      Thanks Sergei for replying. Somehow when I am using your formula for other records, it's not working. I've attached the file for your reference. 

       

      Best,

      G

      • SergeiBaklan's avatar
        SergeiBaklan
        Diamond Contributor

        Guarav, in your texts there is symbol CHAR(160) instead of space. You may use

        =IFERROR(LEFT(A31,SEARCH(CHAR(160)&"at"&CHAR(160),A31)),A31)

        for the left part, for the right one the formula is the same, attached.

        Alternatively you may SUBSTITUTE that symbol on spaces.

Resources