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
|
|
0
|
|
|
|
Reply
|
jseger22
|
12/5/2007 8:08:57 PM |
|
On Wed, 5 Dec 2007 12:08:57 -0800 (PST), jseger22@yahoo.com wrote:
>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]
|
|
0
|
|
|
|
Reply
|
John
|
12/5/2007 11:33:04 PM
|
|
On Dec 5, 6:33 pm, John W. Vinson <jvinson@STOP_SPAM.WysardOfInfo.com>
wrote:
> On Wed, 5 Dec 2007 12:08:57 -0800 (PST), jsege...@yahoo.com wrote:
> >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]
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!
|
|
0
|
|
|
|
Reply
|
jseger22
|
12/6/2007 1:13:09 PM
|
|
|
2 Replies
674 Views
(page loaded in 0.777 seconds)
Similiar Articles: Separating strings in a field to separate fields - microsoft ...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 st... Multi-word string from one field to two fields - microsoft.public ...I have a column with city and state in one field (separated by a space and/or a comma). I want to separate the information into two fields (similar ... Separate By Comma - microsoft.public.access.queries[Name] is the string (coming from the field value ... city and state in one field (separated by a space and/or a comma). I want to separate the information into two fields ... How to split a field into 2 fields? - microsoft.public.access ...Separating strings in a field to separate fields - microsoft ... How to split a field into 2 fields? - microsoft.public.access ... Re: Split a string in one field into two ... parse name and address - microsoft.public.sqlserver.programming ...I have a SHIPTO field that includes name and address separated with carriage ... How do I parse that field into separate fields when I ... you just as well crack the string ... Concatenate and commas - microsoft.public.access.queries ...Separating strings in a field to separate fields - microsoft ..... string value that looks like Item1, Item2, Item3, each item is separated by commas. ... Need to separate and rearrange names - microsoft.public.excel ...... Last Names Into Separate Fields in ... ... ... ... I need to split a field ... Rearranging Order Of Text String ... file with these same names separated and put into 2 separate ... Separate Names - microsoft.public.access... to separate the names into separate fields. Currently the full name is in one field. ... degrees) format with a space separating ... As String Dim strFname As String ... How Write New Field Data From Form Entry Into A Separate Table ...... query to SQL view to see an example of the string you ... General Date from separate date and time fields ... How Write New Field Data From Form Entry Into A Separate Table ... Writing a General Date from separate date and time fields ...As a rule, it's simplest to put both the date and time into on= e > Date/Time field rather than two separate fields. You can enter > > 2/10/2010 11:25:29PM > > into ... Separating strings in a field to separate fields DataBaseHi, 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 Separating strings in a field to separate fields - microsoft ...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 st... VB String Examples: Split Comma-Separated String into FieldsSplit Comma-Separated String into Fields. This example shows how to ... As String ' Split the string at the comma characters and add each field to a ListBox fields() = Split ... ACC: How to Parse Comma-Separated Text into Multiple Fields... text in multiple Text fields. You can use the first method for a Text field that contains two words separated ... Counts the words in a string that are separated ... Specifying how Fields are Separated - The AWK Manual - Field ...would be split into three fields: `m', ` g' and ` gai pan'. The field separator is ... an empty field. The default value of the field separator is a string " " ... 7/20/2012 11:24:15 AM
|