How to Use COUNTIF with OR in Google Sheets

Using COUNTIF with OR in Google Sheets

COUNTIF function in Google Sheets counts the number of cells that meet a specified condition. To use COUNTIF with OR conditions, you'll need to combine multiple COUNTIF functions within a single formula.

Here's a step-by-step guide on how to use COUNTIF with OR in Google Sheets:

  1. Open your Google Sheet.
  2. Click on the cell where you want to display the result.
  3. Type the formula combining multiple COUNTIF functions using the "+" operator. The syntax will look like this:

=COUNTIF(range, criteria1) + COUNTIF(range, criteria2)

Note: You can add more COUNTIF functions if you have more than two OR conditions.

  1. Press Enter.

Example

Let's say we have a list of fruits in Column A, and we want to count the number of cells that contain either "Apple" or "Banana".

Here's how to use COUNTIF with OR in this case:

  1. Open your Google Sheet.
  2. Click on the cell where you want to display the result, let's say B1.
  3. Type the formula:

=COUNTIF(A:A, "Apple") + COUNTIF(A:A, "Banana")

  1. Press Enter.

Now, cell B1 will display the count of cells in column A containing either "Apple" or "Banana".

Did you find this useful?