select specific numbers from a column of numbers in excel

There is a column of numbers like this "19840: [6396".  I am seeking a script that will copy the last four numbers into a separate column.
gregfthompsonAsked:
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.

Martin LissOlder than dirtCommented:
Assuming the data is in col A and you want the new data in B then…


Private Sub CommandButton1_Click()
Dim r As Range
Dim i As Long

Set r = Range("A1").End(xlDown).Offset(0, 0)
For i = 1 To r.Row

    Range("B" & i).Value = Right(Range("A" & i).Value, 4)

Next

End Sub
0
gregfthompsonAuthor Commented:
Thanks MartinLiss.

Can you amend the file and attach?

Greg
0
Martin LissOlder than dirtCommented:
I'm sorry but what file? Did you mean to attach one?
0
Starting with Angular 5

Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

gregfthompsonAuthor Commented:
I've amended the file to have the original column is now A.

Can you include the macro? File is attached.

Thanks,

Greg
0
Martin LissOlder than dirtCommented:
Sorry but there's still no file attached. And I'm on my way out the door for the night… sorry.
0
gregfthompsonAuthor Commented:
Sorry. Here it is.  I am unable to make it work.
Number-split.xlsm
0
Martin LissOlder than dirtCommented:
I put data in col A and it worked just fine. Did you notice that it is code for a command button?
0
gregfthompsonAuthor Commented:
Can you upload the file?
0
Martin LissOlder than dirtCommented:
Okay here it is.Number-split.xlsm
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
gregfthompsonAuthor Commented:
Thank you!
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.