```
Option Explicit
'by Hernan Torres (Mikel ERP)
'December 23, 2019
'Refer to Sheet1
'Question by nurgemedia
'topic: https://www.mrexcel.com/board/threads/convert-2-digit-year-range-to-4-year-range.1118721/
Sub checkFleet()
Dim a, b, c
Dim m() As Variant
Dim i, j, k, l, z As Long
Dim testCell As Integer
Dim strResult As String
On Error GoTo ctrl_error
Application.ScreenUpdating = False
m = Range("A2:A" & Range("A" & Rows.Count).End(xlUp).Row)
For i = 1 To UBound(m)
j = i + 1
If IsEmpty(m(i, 1)) Then GoTo siga
testCell = CInt(Replace(Left(m(i, 1), 4), "-", ""))
If testCell > 1900 Then
testCell = True
Else: testCell = False
End If
Select Case testCell
Case True
Cells(j, 1).Offset(0, 4).Value = m(i, 1)
Cells(j, 1).Offset(0, 1).Value = "Special"
Cells(j, 1).Offset(0, 2).Value = "Special"
Case Else
a = Year(DateValue("1-1-" & Left(m(i, 1), 2)))
Cells(j, 1).Offset(0, 1).Value = a
If IsNumeric(Mid(m(i, 1), Application.WorksheetFunction.Find("-", m(i, 1)) + 1, 2)) Then
b = Year(DateValue("1-1-" & Mid(m(i, 1), Application.WorksheetFunction.Find("-", m(i, 1)) + 1, 2)))
l = Mid(m(i, 1), 7, Len(m(i, 1)) - 6)
Else
b = Year(Date)
l = Mid(m(i, 1), 5, Len(m(i, 1)) - 4)
End If
Cells(j, 1).Offset(0, 2).Value = b
Cells(j, 1).Offset(0, 3).Value = b - a
c = b - a + 1
For z = 1 To c
strResult = strResult & "-" & a
a = a + 1
Next z
k = Len(strResult)
strResult = Mid(strResult, 2, k - 1) & " " & l
Cells(j, 1).Offset(0, 4).Value = strResult
strResult = Empty
End Select
siga:
Next i
ctrl_error:
Select Case Err.Number
Case 0
Application.ScreenUpdating = True
If testCell = 0 Then
MsgBox "Please check source of data, range A2 is empty", vbInformation, "Mikel ERP by @hernantorres23"
Range("A2").Activate
Exit Sub
End If
Range("F1").Activate
Application.ScreenUpdating = True
MsgBox "Job done!!! ...analyzed data", vbInformation, "Mikel ERP by @hernantorres23"
Case Else
Application.ScreenUpdating = True
MsgBox "Please check source of data, range A2 is empty!!!" & Chr(13) & _
"Error number " & Err.Number & " " & Err.Description, vbCritical, "Mikel ERP by @hernantorres23"
Range("A2").Activate
End Select
End Sub
```