xld...too many "Ifs"
Here is what I ended up using:
Function RankCpk(sRank As Range, cpk As Range) As String
Select Case UCase(sRank)
Case "S", "R", "A"
If cpk < 1.33 Then
RankCpk = "100% Inspection Required"
ElseIf cpk <= 1.33 Then
RankCpk = "SPC must be used to control the process"
ElseIf cpk >= 1.67 Then
RankCpk = "Approved"
End If
Case "B", "C"
If cpk < 1# Then
RankCpk = "100% Inspection required"
ElseIf cpk < 1.33 Then
RankCpk = "SPC must be used to control the process"
ElseIf cpk >= 1.33 Then
RankCpk = "Approved"
End If
Case Else
RankCpk = "Char. Rank Not Specified"
End Select
End Function