Excel VBA, <s>48</s> <s>47</s> <s>46</s> 22 Bytes =================== <!-- language-all: lang-vba --> __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 Thanks to Engineer Toast for Changing `Cells(I,1)` to `Debug.?`