IF Function continued...


  1. Click in the box beside Value_if_false.
  2. Type In Stock. graphic of Value_if_false box
  3. Click OK.
  4. In the formula bar, you will see the function:

    =IF(B6=0. "Out of Stock", "In Stock").

    If B6=0 is true, apples are out of stock.

    If B6=0 is false, apples are in stock.

  5. Right click on cell C6.
  6. Click Copy.
  7. Select cells C7:C8.
  8. Click Paste.

In the example above you used =(equal) sign with the If Function. You can use other signs with the If Function to compare and automatically enter data in cells.

Sign Sign means: Example Example means:
= equal (A1=B1) A1 equals B1
> greater than (A1>B1) A1 is greater than B1
< less than (A1<B1) A1 is less than B1
>= greater than or equal to (A1>=B1) A1 is greater than or equal to B1
<= less than or equal to (A1<=B1) A1 is less than or equal to B1
<> not equal to (A1<>B1) A1 is not equal to B1