Seperating Data

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
How can I seperate data that has already been put into a record. I am
importing an excel spreadsheet in which the author has put the subject and
title, seperated by a hyphen, into the same cell. I would of course like to
seperate this information into seperate feilds.

I think it will be a querry that makes a new feild by indetifying the
hyphen, copying everything to the right of the hyphen into the new feild, and
then doing the same for everything left of the hyphen....but I don't know how
to make it happen yet!

Help!

Thanks!
 
Someone else gave me this code for a very similar situation, to use in an
append query, but it will work in a select query as well:
Author: Mid([FieldName],InStr([FieldName],"-")+1)
Should give you every thing to the right
Subject: Left([FieldName],InStr([FieldName],"-")-1)
Should give you every thing to the left

Jen
 

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

Back
Top