Pages

Monday, December 19, 2011

Excel 2007: IF Statement


In this excel tutorial, we are learn about "if statement" in excel and how to use it in excel.

If statement is used in decision making process in excel. If a condition specified by you satisfied then it gives you one value and if it is false then gives you another value.

IF Statement Syntax


=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.

Example:
Suppose you want to purchase four equipment. Your budget to purchase these equipment is as shown in the table below. Now, you want to find out whether all the equipment are within your budget or not. 













Using IF Statement

  1. Click "D2" in excel sheet.
  2. Type " =IF(C2>=B2, "Within Budget", "Out of Budget") " without quotes.
  3. Press "Ctrl + Enter" on keyboard.
  4. Click at the bottom right corner of the selection box and drag down to fill row D2 TO D5.
If statement can also be used to perform mathematical operations when a specified condition is satisfied as shown in the below example.


  1. Click " E2 " in excel spreadsheet.
  2. Type " =IF(C2>=B2, B2-C2, - (C2-B2)) ".
  3. Press "Ctrl + Enter" on keyboard.
  4. Click at the bottom right corner of the selection box and drag downwards to fill row E2 to E5.
The positive value in the above example indicates price more then the budget and negative value indicates price lesser than budgeted price. If you like this post leave a comment. 

1 comment:

  1. I am happy to find your distinguished way of writing the post. Now you make it easy for me to understand and implement the concept. Thank you for the post.

    Arianne
    www.gofastek.com

    ReplyDelete

Recent Posts

HostGator Promos