Choosing an Action Using IIf(expr, truepart, falsepart) : IIF « Language Basics « VBA / Excel / Access / Word






Choosing an Action Using IIf(expr, truepart, falsepart)

 
Sub iffDemo()
    Debug.Print IIf(1 < 10, "True. 1 is less than 10", "False. 1 is not less than 10")
End Sub

 








Related examples in the same category

1.The Immediate If (IIf)
2.Use IIF(conditional test, value for True, value for False)
3.Use IIF to calculate value