Microsoft KB Archive/58033

= Microsoft Knowledge Base =

File: Conditional IF Statements in Calculated Fields
Last reviewed: October 27, 1994

Article ID: Q58033

Summary:

Microsoft File does not support the use of IF statements in calculated fields. The formula, however, can be made conditional depending on another field(s).

More Information:

Use binary notation in a conditional field (1 for yes, 0 for no) and use the number in that field as the &quot;decision bits&quot; in the formula. Two examples follow:

Suppose you have a field called Public and another called Due Date. If the company is public (Public = 1), the due date is 10 days from the start date; otherwise (Public = 0), the due date is 4 days from the start date. Start Date is another column, as in the following formula:

=Start Date + 4 + (6*Public) If the company is public, the result is Start Date +10; if it is not public, the result is Start Date + 4.

Salaried employees (Salaried = 1) accrue sick leave at 3.1 hours/week, and hourly employees (Salaried = 0) accrue sick leave at 1.6 hours/week. To show that value in a computed field, use the following formula:

=1.6 + (Salaried*1.5)