I have asked it here too: http://www.mrexcel.com/forum/excel-questions/796167-numbering-increments-1-1-n.html
I'm using a named cell, from that position, 13 positions to the right, I'd want to start numbering until it reaches the last cell in the column that's 2 positions from that same named cell. I ask because my table is going to change and having a named reference is good for that matter.
This is what I got after recording a macro and cleaning up its .Select, it still has a hard coded destination range.
Here's an illustrative example:
Sub Macro2()
Range("endofheaders").Offset(0, 13).FormulaR1C1 = "1"
Range("endofheaders").Offset(0, 13).AutoFill Destination:=Range("DZ6:DZ21"), Type:=xlFillSeries
End Sub
I hope this doesn't get too confusing, but the next code is what I used to have when I wasn't taking into account that my source table was going to change its size. It had hard coded ranges everywhere, which is why when I edited the table, it stopped working.
With Range("EA6:EA" & Range("DN" & Rows.count).End(xlUp).Row)
.Cells(1, 1).Value = 1
.DataSeries Rowcol:=xlColumns, Type:=xlLinear, Step:=1, Trend:=False
End With
Thanks in advance.