Rarely do you have to Select cells in VBA to perform an action on them. Selecting each cell is very inefficient. Your code can be reduced to this:
Dim BtmRow As Long
Range("D1").FormulaR1C1 = "1"
Range("D2").FormulaR1C1 = "2"
Range("D3").FormulaR1C1 = "3"
Range("D1:D3").AutoFill Destination:=Range("D1:D" & Bottom), _
Bottom = Sheets(1).Range("A65536").End(xlUp).Row
For nxtRw = 1 To Bottom
Range("D" & nxtRw) = nxtRw
I should also point out that while Sheets(1).Range("A65536").End(xlUp).Row works fine in Excel versions earlier than 2007, it might not work in 2007 and beyond.
In 2007 and later, there are more than 65536 rows available in a spreadsheet.
This code, which will work in any version that supports VBA, is the new standard:
Bottom = Sheets(1).Range("A" & Rows.Count).End(xlUp).Row
Since Rows.Count will return the number of Rows in any spreadsheet, it is backward compatible to all versions of Excel that support VBA.
Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.