'If' operator requires either two or three operands

The If operator accepts only two or three arguments.

Error ID: BC33104

To correct this error

  • Examine the If expression to see whether the number of operators can be reduced or extended to either two or three arguments.

  • Consider using another conditional construction, such as an If...Then...Else statement or a nested If...Then...Else statement to organize the arguments.

See Also

Reference

If Operator

If...Then...Else Statement (Visual Basic)