Private Sub Worksheet_Change(ByVal Target As Range)
Dim stt As Range
If Not Intersect(Target, [C2:c100]) Is Nothing And Not IsEmpty(Target) And Target.Count = 1 Then
Set stt = [c:c].Find(UCase(Left(Target, 1)), , , , , , 1)
If stt.Row < Target.Row Then
no = Right(stt.Offset(, -1), 3) + 1
Do
Set stt = stt.Resize(10000).Find(UCase(Left(Target, 1)), , , , , , 1)
If Not stt Is Nothing And stt.Row < Target.Row Then no = Right(stt.Offset(, -1), 3) + 1
Loop While stt.Row < Target.Row
Else
no = "001"
End If
Target.Offset(, -1) = UCase(Left(Target, 1)) & Format(Now(), "yymmdd") & Format(no, "000")
End If
End Sub