Como usar a fórmula OR no Planilhas Google

O OU formula in Google Sheets accepts logical expressions as input arguments, evaluates them to either a logical VERDADEIRO ou FALSO. If all of the input arguments evaluate to FALSE, then the formula returns FALSE as the end result. However, if any of the input arguments evaluate to TRUE, the formula returns TRUE as an output.

Sintaxe

OR(logical_expression1, [logical_expression2, …])

expressão_lógica1 – is an expression that evaluates to a logical TRUE or FALSE. This can be a direct expression or a reference to the cell that represents a logical expression.

[expressão_lógica2, ...] – these are optional and additional expressions that return a logical TRUE or FALSE.

Usage: OR Formula in Google Sheets

Let us try various combinations of input arguments within the OR formula and examine the results. You may have already guessed that the first two variations of the formula with a single input argument, aren’t that useful to us.

OR formula google sheets 1

It is interesting to note that the OR formula works even when we provide numbers as the input arguments. What happens when the Google Sheets application encounters a number when it is expecting a logical TRUE or FALSE? It simply converts them to a logical TRUE or FALSE. A zero is converted to FALSE and a non-zero to TRUE. Doesn’t really matter if the numbers contain decimals. Please see the examples in the snapshot below.

OR formula in google sheets 2

The OR formula also takes a range of cells as an input argument, as illustrated in the image below.

OR formula in google sheets 3

While it is hard to deny the utility of the OR formula in the real world, probably it has a limited application as a standalone formula. However, when it is used in conjunction with other formulas como IF, we can see its magic coming to life. In the snapshot below, consider the first and third formulas. The second and fourth formulas are their alternatives. Notice how simple it gets when we use OR instead of multi-level IF formula nesting.

OR formula in google sheets 4

OR formula

And there you go! Use the OR formula in Google Sheets to evaluate logical expressions.

Se quiser saber mais sobre as várias fórmulas do Planilhas Google, dê uma olhada em nossa postagem no blog sobre o AND formula in Google Sheets.

Como alternativa, confira as postagens relacionadas no blog abaixo!

Você também pode gostar...

Recursos e fórmulas do Google Sheets

Como encontrar a taxa de juros nominal usando o Planilhas Google

Sarah é uma jovem profissional que está tomando decisões financeiras importantes. De cartões de crédito a hipotecas, empréstimos estudantis e investimentos...
Recursos e fórmulas do Google Sheets

Extrair dados do Google Agenda para o Planilhas Google usando o Apps Script

Esta postagem foi publicada originalmente em nosso fórum da comunidade. Objetivo: Este guia demonstra como usar o Google Apps Script para extrair dados...
Recursos e fórmulas do Google Sheets

Usando a função PROPER para colocar a primeira letra de cada palavra em maiúscula no Planilhas Google

Observação: esta postagem foi publicada originalmente em nosso fórum da comunidade. Alguma vez você já precisou limpar uma lista de nomes, títulos ou qualquer...