Forum Discussion

Asparagus's avatar
Asparagus
Brass Contributor
Oct 31, 2023

How to get the text before and after a hyphen with space on each side of it?

Hi. I have a list of songs with the artist name and song name separated by a hyphen (space on both sides of it) and their. Please see enclosed image. With a formula, I would like to separate the artist and song names into two different cells without bringing along the space that follow and proceeds them respectfully.  Is this possible?

 

 

  • Asparagus 

    If you have Microsoft 365, enter this formula in B2:

     

    =TEXTSPLIT(A2, " - ")

     

    It will spill to C2. Fill down as far as needed.

     

     

  • Asparagus 

    If you have Microsoft 365, enter this formula in B2:

     

    =TEXTSPLIT(A2, " - ")

     

    It will spill to C2. Fill down as far as needed.

     

     

    • Asparagus's avatar
      Asparagus
      Brass Contributor
      Hehe, awesome!! Thanks so much this save me hours of work.

      cheers

Resources