IF Function continued...
- Click in the box beside Value_if_false.
- Type In Stock.
- Click OK.
- 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.
- Right click on cell C6.
- Click Copy.
- Select cells C7:C8.
- 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 |
|