How do I parse text from one cell to another cell?

I would like to move row by row the space following the number through the closing parenthesis for each row to column B.  Since each line of data is not the same length, how do you write a macro to accomplish the task?  I would like to invoke the Do Until/While function if possible.

            A                                                                  B
25594831  Test.xlsm                                                                  (Too Tall)      
29354138 (Andrew Dillenger)      
22970876 (Olaniyi O Joshua-olagunju)      
27761698 (Charlie M Channington)      
29126146 (Nathan L Budafucco)
cowboywmAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

FlysterCommented:
If you would like to do it without VBA you can use this formula. Paste it in B1 and copy down:

=MID(A1,FIND("(",A1)+1,LEN(A1)-FIND("(",A1)-1)

Flyster
0
Katie PierceCommented:
You can also utilize the Tsxt to Columns button on the Data ribbon, using "space" as the separator.
0
Rob HensonFinance AnalystCommented:
Katie, using Space as the separator would split the names across 3 columns in some cases; it would be better to use the ( as a separator. You can then use Find and Replace to get rid of the ) from the end of the result.

Thanks
Rob H
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

NorieAnalyst Assistant Commented:
Try this.
Sub SplitNameAndNumber()
Dim arrNums As Variant
Dim arrNames As Variant

    With Range("A1", Range("A" & Rows.Count).End(xlUp))
        arrNums = Evaluate("INDEX(LEFT(" & .Address & ",SEARCH("" ""," & .Address & ")-1),,1)")
        arrNames = Evaluate("INDEX(SUBSTITUTE(MID(" & .Address & ",SEARCH("" ""," & .Address & ")+2, LEN(" & .Address & ")), "")"",""""),,1)")
        .Value = arrNums
        .Offset(, 1).Value = arrNames
    End With
End Sub

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Katie PierceCommented:
Good call, Rob.
0
cowboywmAuthor Commented:
This solution works the best and it's really fast, too.  Thank you so much.
0
Katie PierceCommented:
I think you chose the wrong solution as the accepted solution--it should have been Rob, correct?
0
cowboywmAuthor Commented:
No, the best solution was Norie's.  Don't know how to fix that.
0
Rob HensonFinance AnalystCommented:
Request Attention (at top of page) and ask for question to be re-opened for re-allocation of points.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.