Quote Originally Posted by Aflatoon View Post
Not exactly - IIf always evaluates all the expressions, unlike an If..Then. It's more like the IFS function in Excel.
Interesting, could you expand?

To me

FinalCost = IIf (IsTaxable, BasicCost * TaxRate, BasicCost)
Is equivalent to

If IsTaxable Then
    FinalCost = BasicCost * TaxRate
Else
    FinalCost = BasicCost
since there is a only a single test and single True/False return

IIf(expr, truepart, falsepart)
whereas I'd think the IIF worksheet function

Simple syntax

Generally, the syntax for the IFS function is:


=IFS([Something is True1, Value if True1,Something is True2,Value if True2,Something is True3,Value if True3)
would be more like a string of If / Then / ElseIf / Then / ..... / ElseIf / THen / End If

Admittedly not important in the overall scheme of things, but when you're retired you have too much time on your hands