Making Decisions (IF)

Syntax: IF(Test; True; False)

The most important of all conditional functions used in OpenOffice.org Calc is IF. It takes three arguments:

  • Test: the condition you want to test for.
  • True: what IF returns when test returns TRUE.
  • False: what IF returns when test returns FALSE.

In the case of the tax rates mentioned on the previous page, you need to build a nested formula that uses more than one IF function. Let’s do it one step at a time.

The first condition is for the $5,000 exemption. Put the taxable income into cell A2 and the tax-free allowance into cell B2. The formula will look like the following one and in Figure 13-1. You can put it anywhere, but for the purpose of this exercise it will be cell A5:

=IF(A2 > B2; "Add ...

Get Beginning OpenOffice Calc: From Setting Up Simple Spreadsheets to Business Forecasting now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.