Private Sub Worksheet_Change(ByVal Target As Range)
Dim V As Long, D1 As Date, D2 As Date
If Target.Column <> 1 Then Exit Sub
On Error Resume Next
V = Target.Value: If Err Then Exit Sub
On Error GoTo 0
If V > 367 Then Exit Sub
D1 = DateSerial(Year(Date), 1, V): D2 = DateSerial(Year(Date) + 1, 1, V)
Application.EnableEvents = False
If Abs(D2 - Date) < Abs(D1 - Date) Then Target.Value = D2 Else Target.Value = D1
Application.EnableEvents = True
End Sub