Excel VBA, 48 47 46 22 21 Bytes
Immediates Window Function
Anonymous VBE Immediates Windows Function that takes input of the expected type Variant\Integer
and from cell [A1]
outputs to the VBE immediates window
For I=1To[A1]:?I:Next
Old Sub
routine Version
Code:
Sub F(N):For I=1To N:Cells(I, 1)=I:Next:End Sub
Usage:
Sub Test(): F 100: End Sub
Changes:
-24 Bytes for converting to Immediates Window Function
-1 Byte for condensing I=1 To
to I=1To
-1 Byte thanks to Engineer Toast for Changing Cells(I,1)
to Debug.?
-1 Byte for removing whitespace
##Output to ActiveSheet, 30 28 Bytes
Output to ActiveSheet, 30 28 Bytes
Anonymous VBE immediate window function that takes input from range [A1]
and outputs to the range [1:1]
[A1].Resize([A1],1)="=Row()"
-2 Bytes for removing A1
from Row(A1)