Hi,
In VBA pseudocode, the formula translates to:
Code:
If (B31:B34 are all less than today) And ( either (B36 is empty) Or (B36 = 2) ) Then
Function Value = 2
ElseIf (B31:B34 are all less than today) And (B36 = 4) Then
Function Value = 4
ElseIf (Any of B31:B34 are greater than today) Or ( (B31:B34 are all less than today) And (B36 = 1) ) Then
Function Value = 1
Else
Function Value = "Error"
End If
Only you can tell whether or not the logic of that formula is correct!
Hope that helps..