I think this is due to the limitations of the TRANSPOSE function, try it as below where the need for this function has been removed.
Sub FormulaInVBA_Col_L()
Dim ws As Worksheet
Dim lastRow As Long, i As Long
Dim matchCountOne As Long, matchCountTwo As Long
Dim arrData As Variant, results As Variant
'Turn off application settings
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Set ws = ThisWorkbook.Worksheets("Test Data")
lastRow = ws.Cells(ws.Rows.Count, "A").End(xlUp).Row + 1
'Read data into an array for faster processing
arrData = ws.Range("A2:J" & lastRow).value
ReDim results(1 To UBound(arrData), 1 To 1)
For i = 1 To UBound(arrData) - 1
If arrData(i, 1) = arrData(i + 1, 1) And arrData(i, 2) = arrData(i + 1, 2) And _
arrData(i, 9) = arrData(i + 1, 9) And arrData(i, 10) = arrData(i + 1, 10) Then
'Matching row found, increment counts based on value in column E (position 5 in array)
If arrData(i, 5) = 1 Then
matchCountOne = matchCountOne + 1
ElseIf arrData(i, 5) = 2 Then
matchCountTwo = matchCountTwo + 1
End If
Else
'Non-matching or final match in a series - determine what to write in column K
If matchCountOne > 0 And matchCountTwo = 0 Then
results(i, 1) = "YES"
ElseIf matchCountTwo > 0 And matchCountOne = 0 Then
results(i, 1) = "NO"
Else
results(i, 1) = "MAYBE"
End If
'Reset counters and set new start row
matchCountOne = 0
matchCountTwo = 0
End If
Next i
'Write results to Column K
ws.Range("L2:L" & lastRow - 1).value = results
'Turn on application settings
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub