Microsoft KB Archive/61943

Works: Using Nested IF Statements for Ranges of Values

PSS ID Number: Q61943 Article last modified on 06-12-1996

1.00 1.05 2.00

MS-DOS

= SUMMARY =

The example below demonstrates how IF statements can be nested in the Works Spreadsheet to specify a category based upon a numeric value. This example assigns a student a grade of 4.0, 3.0, 2.0, 1.0, or 0.0, based on the cumulative percentage earned over a term.

If a student’s percentage is greater than 90 percent, the student will earn a 4.0 grade. If his or her percentage is at least 85 percent and less than 90 percent, the student will earn a 3.0 grade, etc.

The following formula shows how nested IF statements in a cell automatically generate a grade for a student:

=IF(A1>=0.75,IF(A1>=0.8,IF(A1>=0.85,IF(A1>=0.9,4,3),2),1),0)

The IF function is described on Page 326 of the “Microsoft Works Reference” version 2.0 manual. Please note that the formula generates a number; text cannot be generated using IF statements.

KBCategory: kbother KBSubcategory: dworkskb Additional reference words:

=
================================================================ Copyright Microsoft Corporation 1996.