If you want to add boolean values in Google Sheets, there is a great built-in function for this called the TRUE function.
This can be useful in many different scenarios where you want to add boolean values to your spreadsheet.
In this tutorial, I will show you how to use the TRUE function in Google Sheets. I will also show a few useful examples of how this might be used in a spreadsheet.
Table of Contents
What is the TRUE Function?
The TRUE function is a simple function that returns the logical value of “TRUE” to your cell.
The syntax of the TRUE function is:
You can also usually just place “TRUE” in a cell and Google Sheets will convert it to the logical “TRUE” value which is the same as using this function.
Here is an example of how TRUE works in a spreadsheet:
You can see from the example above that this is a pretty basic function that just returns TRUE.
One important thing to note is that the boolean value of TRUE has a numeric value of 1 in Google Sheets. FALSE has a number value of 0. So you can do basic math operations with these boolean values.
Here is an example of how this works:
Using the TRUE Function
Now you may be wondering how exactly this function will be useful. I will show you a few different situations where you may want to use this function.
In most cases, the TRUE function is used in combination with other logical functions such as IF, OR, AND, IFERROR, ISNA, etc.
Let’s take a look at a few examples of using this function with other logical functions.
Using TRUE with IF
One way that we can use TRUE is with the IF function to return boolean values depending on if our logical expression evaluates to true or false.
Here is the syntax for using TRUE with IF:
What this formula will do is evaluate your expression and if it is true it will return TRUE, and if it is false it will return FALSE.
Here is an example of how this would be used in a spreadsheet:
You can see that by adding the TRUE function to your formula you can return both TRUE or FALSE depending on how your expression evalutes.
Using TRUE with OR
You can also use OR with TRUE and the IF function to return TRUE if any of a set of conditions are met.
This is how this would be set up in a sheet:
Using TRUE with IFERROR or ISNA
Another common way that the TRUE function is used is with the IFERROR or ISNA functions to return TRUE if there is an error in your data.
You can see by combining this with the IFERROR function the formula will return TRUE to help us deal with errors.
The TRUE function has many uses, though this might not be a function you use every day as you work with spreadsheets.
Still, the function has its uses and it’s a good thing to know how and when to use it.