Separating strings in a field to separate fields

J

jseger22

Hi,

I have a field that consists of a string value that looks like Item1,
Item2, Item3, each item is separated by commas. I want to separate
that string value so that each item has its own field. Is there code
that will easily do this?

Thanks,
Jaime
 
J

John W. Vinson

Hi,

I have a field that consists of a string value that looks like Item1,
Item2, Item3, each item is separated by commas. I want to separate
that string value so that each item has its own field. Is there code
that will easily do this?

Thanks,
Jaime

Yes... but it differs depending on the circumstances. Are there always exactly
three items? An arbitrary number of items? Is there always at least one comma
or might some records have none?

Take a look at the VBA help for InStr, Mid, and Split and post back with a bit
more detail (and perhaps an example) if you need more help.

John W. Vinson [MVP]
 
J

jseger22

Yes... but it differs depending on the circumstances. Are there always exactly
three items? An arbitrary number of items? Is there always at least one comma
or might some records have none?

Take a look at the VBA help for InStr, Mid, and Split and post back with a bit
more detail (and perhaps an example) if you need more help.

John W. Vinson [MVP]

There will always be a max of three items and they will always but
separated by commas. I was trying to do this with the Split function
but I am only a beginner with VBA so I am having some troubles. If
you could help me out with an example that would be much appreciated.
Thanks!
 

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