Sub IIFSub() Dim strMessage As String Dim intNum As Integer intNum = 12 strMessage = IIf(intNum > 10, "Number is greater than 10", "Number is less than 10") Debug.Print strMessage End Sub