Run the code below in your sample file. The comments in the code explains how it works.
As you have a lot of data, I read the data into an array and process that. And I use arrays also to write the data back into the sheet. That is much faster as if you access each single cell.
Andreas.
Option Explicit
Sub Test()
Const MaxDouble = 1.79769313486231E+308
Const MinDouble = -1.79769313486231E+308
Dim Where As Range
Dim Data As Variant, Item As Variant
Dim i As Long
Dim Y As Integer, M As Integer, LastY As Integer, LastM As Integer
Dim YMin As Double, YMax As Double, MMin As Double, MMax As Double, This As Double
Dim YResult As New Collection, MResult As New Collection
'Step 1: Analyze the data
'Read in all data
Set Where = Range("C2", Range("A" & Rows.Count).End(xlUp))
Data = Where.Value
'Initialize
YMin = MaxDouble
YMax = MinDouble
MMin = MaxDouble
MMax = MinDouble
For i = 1 To UBound(Data)
'Parse the date
Y = Left(Data(i, 1), 4)
M = Mid(Data(i, 1), 5, 2)
'Does the year change?
If LastY <> Y Then
'First run?
If LastY > 0 Then
'Store into the collection
YResult.Add Array(LastY, LastM, YMin, YMax)
End If
End If
'Does the month change?
If LastM <> M Then
'First run?
If LastM > 0 Then
'Store into the collection
MResult.Add Array(LastY, LastM, MMin, MMax)
End If
'Initialize
LastM = M
MMin = MaxDouble
MMax = MinDouble
End If
'Initialize
If LastY <> Y Then
LastY = Y
YMin = MaxDouble
YMax = MinDouble
End If
'Max value
If IsNumeric(Data(i, 2)) Then
This = Data(i, 2)
If This > YMax Then YMax = This
If This > MMax Then MMax = This
End If
'Min value
If IsNumeric(Data(i, 3)) Then
This = Data(i, 3)
If This < YMin Then YMin = This
If This < MMin Then MMin = This
End If
Next
'Grab the last ones
YResult.Add Array(LastY, LastM, YMin, YMax)
MResult.Add Array(LastY, LastM, MMin, MMax)
'Step 2: Output
'Clear previous result
Range("E1").CurrentRegion.Clear
'Create space and headings for the year data
ReDim Data(0 To YResult.Count, 1 To 3)
Data(0, 1) = "Year"
Data(0, 2) = "Min" & ChrW(&H2193)
Data(0, 3) = "Max" & ChrW(&H2191)
'Compile the year data
i = 0
For Each Item In YResult
i = i + 1
Data(i, 1) = Item(0) 'Year
Data(i, 2) = Item(2) 'Min
Data(i, 3) = Item(3) 'Max
Next
'Flush into the sheet (Note 1st dimension is zero based)
Range("E1").Resize(UBound(Data) + 1, UBound(Data, 2)).Value = Data
'Create space and headings for the month data
'Note: As we have min and max for each month we need 24 slots
ReDim Data(0 To YResult.Count, 1 To 12 * 2)
For i = 1 To 12 * 2
'Abbreviated month name with a up / down arrow
Data(0, i) = MonthName(i / 2 + 0.1, True) & IIf(i Mod 2, ChrW(&H2193), ChrW(&H2191))
Next
'Compile the month data
i = 0
LastY = 0
For Each Item In MResult
Y = Item(0) 'Year
M = Item(1) * 2 - 1 'Month (corrected to fit the slot)
'Next row if the year changes
If LastY <> Y Then
i = i + 1
LastY = Y
End If
Data(i, M + 0) = Item(2) 'Min
Data(i, M + 1) = Item(3) 'Max
Next
'Flush into the sheet (Note 1st dimension is zero based)
Range("H1").Resize(UBound(Data) + 1, UBound(Data, 2)).Value = Data
End Sub