gregfthompson
asked on
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.
ASKER
Thanks MartinLiss.
Can you amend the file and attach?
Greg
Can you amend the file and attach?
Greg
I'm sorry but what file? Did you mean to attach one?
ASKER
I've amended the file to have the original column is now A.
Can you include the macro? File is attached.
Thanks,
Greg
Can you include the macro? File is attached.
Thanks,
Greg
Sorry but there's still no file attached. And I'm on my way out the door for the night… sorry.
ASKER
Sorry. Here it is. I am unable to make it work.
Number-split.xlsm
Number-split.xlsm
I put data in col A and it worked just fine. Did you notice that it is code for a command button?
ASKER
Can you upload the file?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you!
Private Sub CommandButton1_Click()
Dim r As Range
Dim i As Long
Set r = Range("A1").End(xlDown).Of
For i = 1 To r.Row
Range("B" & i).Value = Right(Range("A" & i).Value, 4)
Next
End Sub