Clear, practical technology insights BSOD Code Lookup · Windows Error Code Lookup · Wi-Fi Troubleshooting · PC Troubleshooting Checklist

How to Use the AND and OR Functions in Google Sheets

Learn how to Use the AND and OR Functions in with clear steps, useful examples, and practical tips. Complete the task correctly and avoid common mistakes.

Table of Contents

This updated guide explains how to Use the AND and OR Functions in Google Sheets through clear steps, practical examples, and important checks that help prevent common errors.

If you use AND with multiple arguments, all of those arguments must be true for a TRUE response; otherwise, the AND function will return FALSE results. If you use OR, only one of the correct arguments, the OR function, will provide the TRUE response.

You can use AND and OR separately or together with other functions, such as IF.

Use the AND Function in Google Sheets

You can use the AND function yourself or in combination with other functions to provide a logical test (TRUE or FALSE).

To get started, open Google Sheets and click a blank cell. Import:

=AND(Argument A, Argument B)

Replace each argument with the criteria you may need to use. You can use as many arguments as you want, but you must have at least one argument for AND to work.

In the example below, the article used 3 arguments:

  • The first argument is the simple calculation 1 + 1 = 2 .
  • The second argument indicates that cell E3 is equal to 17.
  • Finally, the third argument indicates that the value of cell F3 (is 3 ) is equal to the calculation 4-1.

Because all three arguments are correct, the AND formula returns TRUE in cell A2. If any of these arguments are changed, it will cause the AND formula in A2 to change the response from TRUE to FALSE.

Use the AND and OR Functions in Google Sheets — Use the AND Function in Google Sheets screenshot 1 The AND formula returns TRUE in cell A2

In the example below, the AND formula in cell A3 has two correct arguments and one is incorrect ( F3 = 10 , while F3 is actually equal to 3 ). This causes the AND function to give FALSE feedback.

Use the AND and OR Functions in Google Sheets — Use the AND Function in Google Sheets screenshot 2 The AND function gives a FALSE response

Use the OR Function in Google Sheets

While AND requires all the arguments it uses to be true, OR requires only one argument to be true to give TRUE feedback.

Like AND, you can use the OR function alone or combine it with other functions. As with AND, you can use as many arguments as you want, but you must have at least one argument for the function to work.

To use OR, click a blank cell and enter:

=OR(Argument A, Argument B)

Replace with your arguments.

In the example below, the formula using OR in cell A2 has an incorrect argument ( F3 = 10 , where F3 is actually equal to 3 ).

Unlike when you use AND, one of the three incorrect arguments still results in TRUE. For FALSE results, all arguments you use must be incorrect.

Use the AND and OR Functions in Google Sheets — Use the OR Function in Google Sheets screenshot 3 One of the three incorrect arguments still gives TRUE results

In the example below, the OR formula in cells A4 and A5 returns the FALSE response, because all three arguments in the two formulas are incorrect.

Use the AND and OR Functions in Google Sheets — Use the OR Function in Google Sheets screenshot 4 The OR formula in cells A4 and A5 returns the FALSE response

Use AND and OR with IF

Because AND and OR are logical functions with TRUE and FALSE responses, you can also use them with IF. When you use IF, if an argument is TRUE, it will return a value, otherwise the function will return another value.

The format of the formula using IF is:

=IF(Argument, Value IF TRUE, Value IF FALSE)

For example, as shown below, = IF (E2 = 1,3,4) causes IF to return 3 , if cell E2 equals 1 ; otherwise it returns 4 .

Use the AND and OR Functions in Google Sheets — Use AND and OR with IF screenshot 5 = IF (E2 = 1,3,4) causes IF to return 3, if cell E2 equals 1

Because IF only supports a single argument, you can use AND and OR to perform complex logical tests with multiple arguments.

Use AND with IF

To use AND in an IF formula, enter:

=IF(AND(AND Argument 1), Value IF TRUE, Value IF FALSE)

In the example below, the article used IF with the same AND formula nested in cell A2 with 4 arguments. All 4 arguments are true, so the IF TRUE value (in this case, Yes ) is returned.

Use the AND and OR Functions in Google Sheets — Use AND with IF screenshot 6 All 4 arguments are true, so the IF TRUE (Yes) value is returned

In cell A3, an IF formula similar to AND contains two incorrect arguments. Because AND requires all arguments to be correct, IF returns the IF FALSE value, which is a different text value ( No ).

Use OR with IF

As with AND, you can also use OR with IF to create a complex logical test. Only one OR argument must be correct for IF to return a TRUE response.

To use OR with IF, click a blank cell and enter:

=IF(OR(OR Argument 1), Value IF TRUE, Value IF FALSE)

Replace with the OR argument (s) and your IF TRUE / FALSE value.

In the examples below, the two IF formulas with OR in cells A2 and A3 return the text value IF TRUE ( Yes ). All 4 arguments are true in the A2 IF formula with OR, while A3 has 2 of 4 incorrect arguments.

Use the AND and OR Functions in Google Sheets — Use OR with IF screenshot 7 Two IF formulas with OR in cells A2 and A3 return the text value IF TRUE (Yes)

In cell A4, all 4 arguments in an IF formula with OR are incorrect. This is why the IF formula returns the IF FALSE ( No ) text value instead.

FAQ

What is the easiest way to Use the AND and OR Functions in Google Sheets?

Start with the requirements in this guide, then follow each step in order. Check the result after every major change so problems are easier to identify.

Can beginners follow these instructions?

Yes. The process is organized into practical steps, and you can repeat any step before moving forward.

What should I check if the method does not work?

Confirm your software or device version, permissions, settings, file format, and internet connection when the task depends on online services.

Discussion

Reader Comments 0

Sign in with email or Google to join the discussion.