I'd use a User Defined Function since I (personally) don't like to use long complicated worksheet formulas
Option Explicit
Function EarnedMinimum() As Variant
Dim ws As Worksheet
Dim r As Long
Dim rng As Range
Application.Volatile
r = Application.Caller.Row
Set ws = Worksheets(CStr(r))
Set rng = Application.Caller.Parent.Rows(r)
If Len(rng.Cells(4).Value) = 0 Then
EarnedMinimum = vbNullString
ElseIf rng.Cells(4).Value = "M" Then
If Application.WorksheetFunction.Sum(Worksheets(CStr(r)).Range("$O$32:$O$42")) >= 5 Then
EarnedMinimum = "Yes"
Else
EarnedMinimum = "No"
End If
ElseIf rng.Cells(4).Value = "A" Then
If Worksheets(CStr(r)).Range("$O$32").Value >= 1 Then
EarnedMinimum = "Yes"
Else
EarnedMinimum = "No"
End If
Else
EarnedMinimum = CVErr(xlErrValue)
End If
End Function