I am trying to write a loop that will get my code to take a number entered by a user in cell "C4" and have that value pasted in Cell "C10". Any new number entered by the user should also be pasted under cell "C10". I am stuck down at the bottom of this code at "For i =.." Any help is greatly appreciated
Public Sub Sheet1()
Application.OnKey "{ENTER}", "EnterANumber"
End Sub
Sub EnterANumber()
If Range("C4").Value < 10 Then
MsgBox ("The number you entered is less than 10")
Else
If Range("C4").Value > 10 Then
MsgBox ("The number you entered is greater than 10")
Else
If Range("C4").Value = 10 Then
MsgBox ("The number you entered is 10!")
End If
End If
End If
'copy the number from cell c4 and place it into cell c10
Range("C4").Select
Selection.Copy
Range("C10").Select
ActiveSheet.Paste
'copy the number from C10 and place it in C11. Any new number after that place in C12,C13,C14,etc.
For i = 1 To 100
Selection.Copy
ActiveCell.Offset(1, 0).Select
ActiveSheet.Paste
Next i
End Sub