Zygan
In your code you have used Range("A1:A2653")
Pedros required code to autofill to the last active row, your code does not identify the last active row.
Zygan
In your code you have used Range("A1:A2653")
Pedros required code to autofill to the last active row, your code does not identify the last active row.
Sub Macro1()
'assuming all cells are contiguous
Dim Rws As Integer
Columns("A:A").Insert Shift:=xlToRight
[a1] = "SortNo"
Rws = [a1].CurrentRegion.Rows.Count
[a2] = 1
Range(Cells(2, 1), Cells(Rws, 1)).DataSeries
End Sub
Thanks to everyone for replying!!
Mudraker and Trebor76, both of your solutions work perfectly.
I have included mudrackers in my macro and it is now working as I required.
Thanks again,
Pedros.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks