Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim f
If Not Intersect(Target, Columns("A:A")) Is Nothing Then
f = ActiveCell.Offset(-1, 0) & "0000"
If Len(ActiveCell.Offset(-1, 0)) > 2 Then ActiveCell.Offset(-1, 0) = Format(f, "0000000")
End If
End Sub