Extracting data from a text string

  • Thread starter Thread starter !Jeremy
  • Start date Start date
J

!Jeremy

Excel 2000 Win98SE

I'm creating a music catalogue of my mp3 files. The file names are in the
format

Frank Sinatra - Stardust.mp3

I've managed to extract the Artist Name and Song Name by using the =search()
function and looking for either "-" or "." to trim the filenames. The
problem is that some filenames do not have the "-" character in them (for
example, theme songs or sound effects).

In these cases I'm getting a #VALUE return in both Artist Name and Song Name
columns because the character I'm searching for does not exist. Does anyone
know how I can add a statement to my function that will cause the entire
filename to be entered into both columns in these cases?

What I'm looking for is a function that says "If there is a character "-" in
the filename do this, otherwise do that".

Thanks in advance.
 
Back
Top