Hi oracle741
Place this Code in the This Workbook Module
Option Explicit
Private Sub Workbook_Open()
Dim wSht As Worksheet
Set wSht = Sheets("Sheet1") '<-----Change Sheet Name as appropriate
With wSht
wSht.Protect _
DrawingObjects:=True, _
Contents:=True, _
Scenarios:=True, _
UserInterfaceOnly:=True
wSht.EnableSelection = xlUnlockedCells
End With
End Sub
Place this Code in Sheet1 Module (or whatever you named it in the above Code
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim myVal As Variant
If Target.Column <> 3 Then Exit Sub
If Target.Row = 2 Then
Target.Offset(0, -1).Value = "001-0001"
Else
myVal = Split(Target.Offset(-1, -1).Value, "-")(1)
Target.Offset(0, -1).Value = "001-" & Format(Val(myVal + 1), "0000")
End If
End Sub
See attached.
Bookmarks