Banner

Sunday, February 12, 2017

Insert serial Number Automatically In Wortksheet Excell VBA





Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
i = Application.WorksheetFunction.CountA(Sheet1.Range("B:B"))
If i > 1 Then
Sheet1.Range("A" & i).Value = i - 1
End If
End Sub

No comments:

Post a Comment

Please do not enter any spam message in comment box