Separating data in a field

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

Guest

I have a field that contains a last name, first name, id#. How can I pull the
name and number separately?
 
You might look at the Split() function using a comma as the separator.
 
If there are exactly 3 parts, always separated by a single space, you can
use Instr() to locate the space, and Left(), and Mid() to parse the words.

Alternatively, this might help:
ParseWord(): Parses the first, last, or n-th word/item from a field/list
at:
http://allenbrowne.com/func-10.html
 
kltino said:
I have a field that contains a last name, first name, id#. How can I
pull the name and number separately?

You might want to give some details about exactly how the data is
recorded (spaces commas etc.) and how consistent the data is,

Joseph E. Meehan
Joseph E Meehan
Joseph Edward Meehan
Joseph Meehan
Joseph, Meehan
Joseph,Meehan
etc.

I hope you asked this question because you want to separate the data
into logical fields like Fname, Mname, Lname.
 

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