S
SteveDB1
Morning all.
I have a data set that I want to extract the right side from.
Here's an example of the data.
02-243-02 - 0.14
02-243-03 - 0.16
.........
......
.......
where the periods are the continuation of the 7 digits, and the numeric
values to the right. The data set is approx.
100 items, and I'd like to place the numeric values in the cell to the right
of the 7 digit numbers on the left.
I've tried the following, and get a type mismatch error.
Sub ExtractRight()
v = ActiveCell.value
s = Right(v, 4)
For i = LBound(s) To UBound(s)
ActiveCell.Offset(i + 1, 1).value = s(i)
Next
End Sub
I'm figuring that I get the error because right() and my limits don't work
with each other.
How can I accomplish my goal?
Thank you.
Best,
SteveB.
I have a data set that I want to extract the right side from.
Here's an example of the data.
02-243-02 - 0.14
02-243-03 - 0.16
.........
......
.......
where the periods are the continuation of the 7 digits, and the numeric
values to the right. The data set is approx.
100 items, and I'd like to place the numeric values in the cell to the right
of the 7 digit numbers on the left.
I've tried the following, and get a type mismatch error.
Sub ExtractRight()
v = ActiveCell.value
s = Right(v, 4)
For i = LBound(s) To UBound(s)
ActiveCell.Offset(i + 1, 1).value = s(i)
Next
End Sub
I'm figuring that I get the error because right() and my limits don't work
with each other.
How can I accomplish my goal?
Thank you.
Best,
SteveB.