Any ideas on how I could split the data? I need something
that will work everytime so that eventually I can automate
this process if at all possible.
Thanks!
I have a feeling this might be best solved by engaging a
contractor.
David Atkins, MCP
>.
>
>.
>
There's no easy way of doing this; it's necessary to write code that
looks for patterns in the data (e.g. if you find two upper case letters
followed by a space and five digits, there's a good chance that the one,
two or possibly three preceding words are the name of a city). It's
absolutely impossible to write code that will do the job 100% because of
the huge number of variations that need to be taken into account.
If you want to try for yourself, start by experimenting with the
VBSCript regular expression object, which can do the sort of pattern
matching that's involved. There've been some threads on that in this
group lately: search (at groups.google.com) for my name and Robert
Neville's .
Alternatively, there is some commercial software designed for parsing
names and addresses. The cost unfortunately reflects the difficulty of
the task<g>.
John Nurick [Microsoft Access MVP]
Please respond in the newgroup and not by email.
One way to go about it is to split the names in Excel
before you import to access. I think I got this from one
of th MVP's or support sites. What would we do without
them?
Create two functions inside the function bar (equals bar
at the top):
A B C
1 Full Name FirstName LastName
2 Jim Jawn Jim Jawn
B2's Formula would look like this: =LEFT(A2, FIND(" ",
A2)-1)
C2's Formula would look like this: =RIGHT(A2, FIND(" ",
A2)+1)
You add and subtract 1 to account for the space. Once you
get that, you can=just drag the formula down the column,
copy the cells, the paste special values... Once you do
that, you can just reimport.
Jim
>.
>
Jim
>.
>
This approach is fine if there's just a first name and a last name in
the field, but in her original post Crystal said the file had
>Name, Address and Phone number and other info in one column
and that the data
>the data is not all consistent.
It's the inconsistency that makes it so difficult.
On Wed, 6 Aug 2003 07:15:33 -0700, "Jim/Chris" <crev...@excite.com>
wrote: