Extracting data from a text string

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top