Advertisement

Add Serial Numbers - VBA Special

🔰Add Serial Numbers🔰

This macro code will help you to automatically add serial numbers in your Excel sheet which can be helpful for you if you work with large data.

Sub AddSerialNumbers()
Dim i As Integer
On Error GoTo Last
i = InputBox("Enter Value", "Enter Serial Numbers")
For i = 1 To i
ActiveCell.Value = i
ActiveCell.Offset(1, 0).Activate
Next i
Last:Exit Sub
End Sub

To use this code you need to select the cell from where you want to start the serial numbers and when you run this it shows you a message box where you need to enter the highest number for the serial numbers and click OK.

And once you click OK, it simply runs a loop and add a list of serial numbers to the cells downward.

If you have any query or want any help related to excel feel free to join our Telegram channel and message us..

Channel link :

https://t.me/msexcelmaster101

Post a Comment

0 Comments