Ch. 10: Information Systems Controls for Systems Reliability – Part 3: Processing Integrity and
Availability
=IF(AND(A1>=18,A1<=65),””,”Error: values must be between 18 and 65″)
An IF statement consists of three arguments, separated by commas: =IF(first argument,
second argument, third argument). The first argument is the test to be performed, the
The Data Validation tool is easier to use. However, it is limited to performing tests of just
one condition. More complex tests require the IF function. For example, perhaps we want
to treat values of 18, 19, and 20 different from values 21-65. This can be done by nesting
IF statements, as follows:
Step 2: If the first IF statement is true (i.e., the value in cell A1 is greater than or equal to
18) the next test is whether the value is less than 21. If it is, then the message “value is
18-20” is displayed. If the value in A1 is greater than or equal to 21, a third test is
performed, testing whether it is less than or equal to 65.