View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernard Liengme Bernard Liengme is offline
external usenet poster
 
Posts: 4,393
Default Text to the left and right of a character

=LEFT(A1,FIND("-",A1)-2) gets you Beatles
=MID(A1,FIND("-",A1)+2,256) get Yellow Submarine.mp3
=MID(A2,FIND("-",A1)+2,LEN(A1)-FIND("-",A1)-5) gets Yellow Submarine

But have you looked into Data | Text to Columns ?
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

<Esra wrote in message ...
I have a list of file names (Music), the format is "Beatles - Yellow
Submarine" in cells a1 to a10000 (for arguments sake). I want to have
in B1 - Beatles and in C1 - Yellow Submarine.

All files are the same format (Beatles - Yellow Submarine.mp3)

What formulas would I use to get the text to the left of "-" and text
to the right of "-"? Any helpers greatly appreciated

Esra