In this tutorial, you will learn the basics of powerful IF, nested IF, AND, OR conditions in LibreOffice Calc.
Table of Contents
The IF Function is a logical test at your cell which returns TRUE when a condition is met; otherwise returns FALSE. Hence you can use it to return any different value in the target cell based on your test. You can also extend your test using nested-IF conditions clubbed with AND, OR operators.
Logical test for a condition in any given cell.
Returns your values based on TRUE or FALSE. If your return value is omitted, return the string “TRUE”/”FALSE”.
In the example below, when the temperature crosses 40 degrees C, return Hot in the corresponding cell otherwise, return Normal.
The above example depicts a simple IF condition. Let’s see how you can do nested IF with AND condition.
To make it more complex, let’s add more conditions. When the temperature is below 15 deg C it is Cold; when between 15 and 45 deg C – Normal; Otherwise return Hot in the corresponding cell.
The above example contains two IF statements with a nested IF. The FALSE condition of the outer IF contains another IF statement. I.g. when the first condition is False, we check another IF for further condition.
The AND function returns TRUE when both conditions is true.
- The maximum number of levels in nested IF is 42. (via this).
So, this is how you can use the IF function in Calc. Drop a note below if you have any questions.