You are on page 1of 1

Excel 2007 IF Statement

If statements are used to make decisions in excel. If a condition or conditions specified by you is true, then it gives you one value and if it is false then gives you another value. Syntax IF statement

=IF(logical_test, [value_if_true], [value_if_false])


logical_test : It is the condition that you want to test. Value_if_true: It returns this value when above condition is true. Value_if_false: It returns this value when specified condition is false. Lets take an example. Suppose you want to purchase four equipments. Your budget to purchase these equipments is as shown in the table. Now, you want to find out whether all the equipments are within your budget or not. See table below.

Using IF statement 1. 2. 3. 4. Click D2in excel sheet. Type =IF(C2>=B2, Within Budget, Out of Budget) without quotes. Press Ctrl + Enter on keyboard. Click at the bottom right corner of the selection box and drag down to fill rows D2 to D5.

You can also perform conditional mathematical calculations using IF statement. See example below. 1. 2. 3. 4. Click E2 in excel spreadsheet. Type =IF(C2>=B2, B2-C2, - (C2-B2)). Press Ctrl + Enter on keyboard. Click on bottom right corner of the selection box and drag down to fill row E2 to E5.

You might also like