IIf Function
I just ran across the IIf function and am trying to clarify its usage.
I would normally write:
If Len(Range("A1")) 0 then
Var1 = "Yes"
Else
Var1 = "No"
End If
It looks like I could write:
Var1 = IIf(Len(Range("A1")) 0, "Yes" , "No")
Is my logic correct?
Would this be the principle use of that function, to shorten the coding
required in my example? Or is this function used in some other types of cases?
--
Ken Hudson
|