Compare numbers using the iif function

With the iif function you can, for example, compare a number with a fixed limit, and return either the value itself or an error message. Let's say that you check whether the compound amount is lower than 0.05 µg/ml. If the amount is lower, the actual amount should be displayed. If it is higher, the message "too high" should be displayed.

The general syntax of the iif function is:

=iif(condition, then-value, else-value)

In this example, the complete expression would be:

=iif(Compound_Amount < 0.05, Compound_Amount, "too high")

The unit of the amount is not part of the expression. The unit is defined in the chromatographic data system and is stored in a separate data field.