This should be fairly straight forward, but I am having a tough time getting it figured out. I simply want to insert a blank Column A and then fill in Column A with a series of sequential numbers all the way down until the last value in Column B.
Here is what I have so far...
Cell B2 will always be blank so we need to make sure we are using the .End(xlUp).Row function to make sure the code isn't stopping at cell B2 and is capturing the entire range of Column B.
Unfortunately I can't use file sharing sites here at work, so I am unable to upload a sample. However, here is a photo to give you an idea of what I want done.
Here is what I have so far...
Code:
<code style="margin: 0px; padding: 0px; font-style: inherit; font-weight: inherit; line-height: 12px;">Sub FillSeries()
Columns("A:A").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
'r = row, c = column
Application.Goto Reference:="R1C2"
With Worksheets("Sheet1")
LastRow = .Cells(Rows.Count, "B").End(xlUp).Row
.Range("B1:B" & LastRow).Select
End With</code>
Cell B2 will always be blank so we need to make sure we are using the .End(xlUp).Row function to make sure the code isn't stopping at cell B2 and is capturing the entire range of Column B.
Unfortunately I can't use file sharing sites here at work, so I am unable to upload a sample. However, here is a photo to give you an idea of what I want done.
Last edited: