We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Parsing a string of data

Medium Priority
327 Views
Last Modified: 2012-05-11
I need a function to parse data between (- ) or ( , ) or ( . ) or ( / ).  These could be in different locations within the string.  I need to be able to parse between the first (.) and the second (.) or any one of the other (- ) or ( , ) or ( . ) or ( / ).  

String is as follows:  .AACTS 2001.6400.680.SDC

I need to separate the data into a table as
Field1 = ACCTS 2001
Field2 = 680
Field3 = 6400
Field4 = SDC

Thank You
Comment
Watch Question

CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
fridomCEO/Programmer
CERTIFIED EXPERT

Commented:
Use Split

Option Compare Database
Option Explicit



Public Sub splitIt()
    Dim aString As String: aString = "AACTS 2001.6400.680.SDC"
    Dim coll As Variant
    coll = Split(aString, ".")
    
End Sub

Open in new window

Dale FyeOwner, Dev-Soln LLC
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2010
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Dale FyeOwner, Dev-Soln LLC
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2010

Commented:
Oops, forgot the delimiter (" ") in the split part of that operation.

Author

Commented:
Let me take a look at both and I will get back to you, once I have tried each method.  Thanks
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.