You can do it this way without VBA code:

1. In cell A2, enter: 1
2. In cell A3, enter: =MAX(A$2:A2)+1
3. Copy the formula down to, let say, cell A50
4. Now you have a sequence from 1 to 49
5. Enter 0 to wherever you want to overwrite a formula and you will see the values auto updated.