I don't know if this is more efficient than your code or not (probably "yes"
if then number of rows is large), but we can eliminate your looping through
each cell in the column by modifying your code like this...
Sub Stitution()
Columns("A:A").Insert Shift:=xlToRight
LastRow = Cells(Cells.Rows.Count, "B").End(xlUp).Row
With Range("B1:B" & LastRow)
.Copy Range("A1")
.NumberFormat = "General"
Cells(LastRow + 1, "B").Value = 1
Cells(LastRow + 1, "B").Copy
.PasteSpecial , xlPasteSpecialOperationMultiply
Cells(LastRow + 1, "B").Clear
End With
End Sub
Rick
> Forgot the maximum length of three bit
>
[quoted text clipped - 40 lines]
>> > Thanks,
>> > Diana
Mike H - 12 Mar 2008 19:08 GMT
Rick,
You're correct your modified code is much faster and I considered something
along those lines but couldn't work out a syntax (and still can't) to meet
the OP requirement
> >> > Problem 1: In column A, I want to collect data from column B using
> >> > =RIGHT(B1,3).
for only taking the 3 righmost digits. I'm sure it's simple but I can't see it
Mike
> I don't know if this is more efficient than your code or not (probably "yes"
> if then number of rows is large), but we can eliminate your looping through
[quoted text clipped - 59 lines]
> >> > Thanks,
> >> > Diana