Mohammad Ishaq
Member
Hello Everybody,
I have write a little code for auto numbering in my sheet.The Sheet name is sheet 1 and the column are selected for the code is A and B.
I required some help to modify my code in such a way that when i enter data in column B starting from row 3,the serial no should appear automatically in column A as per entry of column B.
I used the For loops i=0 to 5 but want it for unlimited rows.Please let me help .
I have write a little code for auto numbering in my sheet.The Sheet name is sheet 1 and the column are selected for the code is A and B.
Code:
Sub mylastcell()
Cells(Rows.Count, 1).End(xlUp).Select
For i = 0 To 5
ActiveCell(i, 1).Offset(2, 0) = i + 1
Next i
End Sub
I required some help to modify my code in such a way that when i enter data in column B starting from row 3,the serial no should appear automatically in column A as per entry of column B.
I used the For loops i=0 to 5 but want it for unlimited rows.Please let me help .