Forum Discussion
Peru99
Apr 03, 2022Copper Contributor
macro anywhere in workbook
I need to use a macro anywhere in the worksheet to enter the numbers 1 to 48 but every time I run mine it returns to the same cells.
HansVogelaar
Apr 03, 2022MVP
Does this do what you want?
Sub Test()
Dim i As Long
Application.ScreenUpdating = False
For i = 1 To 48
ActiveCell.Offset(i - 1).Value = i
Next i
Application.ScreenUpdating = True
End SubPeru99
Apr 20, 2022Copper Contributor
Sorry to be so late back I have been suffering with Covid. That is great thanks it works like a dream, very grateful