Sub ValidateTheYear()
Dim x%, y%, z%
On Error Resume Next
'Change 'Sheet1' to the real name of the sheet of interest
With Sheets("Sheet1")
x = .Range("A1").Value 'Beginning year
y = .Range("A2").Value 'Ending Year
z = .Range("A3").Value 'Year to validate
End With
If Not Err.Number = 0 Then _
MsgBox "One or more of the years are not valid.", , "Invalid Year(s)": Err.Clear: Exit Sub
If z < x Or z > y Then _
MsgBox "' " & z & " ' is outside of the given parameters.", , "Invalid Year": Exit Sub
'Replace this MsgBox with your code if the year is validated
MsgBox "' " & z & " ' is an acceptable year.", , "All's cool."
End Sub