I would like to loop through the amount of rows that are entered in the Input box +1.
Sub LoopEnter()
myNum = Application.InputBox("Enter number")
For Each r In Range ("A2":"A" & myNum +1)
r.Offset (0.1) = "N"& r
Next r
End Sub
However, ("A2":"A" & myNum +1) is not recognized as a range. What's the correct way to make the range, for example (A2:A41) if the number entered in the InputBox is 40?
"N" & r.Rowto get row numberRange ("A2").resize(myNum)and avoid concatenating.