How To Check If A Value Is In A Range In Google Sheets-2022

Written by Abid Akon

Here's what we'll cover:

As a frequent Google Sheets user, you may come across instances where you need to check and count occurrences of values in your dataset to avoid repetitions and errors but unfortunately, you may not know the best way to go about this. 

In this tutorial, we are going to discuss How To Check If A Value Is In A Range In Google Sheets.

How To Check if a Value is in a Range in Google Sheets?

The easiest way to go about this is the use of the COUNTIF function. This function works on both numerical and text value ranges. 

The COUNTIF function operates by analyzing and searching across the selected cell range and returns the total count of occurrences of the selected value.

When this function is used, a value of one or more is returned to the display or result cell. The COUNTIF function takes the syntax below. 

=COUNTIF(range, criterion). 

Where;

  • Range – This is the selected cell range where the COUNTIF function conducts its search based on the given criterion.
  • Criterion- This is the search value that the COUNTIF function scans for occurrences in the range. 

Checking the repetitions in Google Sheets can be done in two ways.  

  • Counting occurrences. 
  • Checking for a single value in a range. 

Counting Occurrences. 

This is simply the use of the COUNTIF function to find and return the number of occurrences a specific value has. In the sample worksheet below, we have a list of food items.

Some appear more frequently than others. So we would use the COUNTIF function to find the number of times “Corn” was repeated in the worksheet.

1How To Check If A Value Is In A Range In Google Sheets

Step 1: In cell B2, enter the formula =COUNTIF(A2:A15, Corn)

2How To Check If A Value Is In A Range In Google Sheets

Step 2: Hit the Enter key on your keyboard and a value of 3 is returned. This implies that corn was repeated three times. 

3How To Check If A Value Is In A Range In Google Sheets

Checking for a Single Value in a Range. 

Here, we want to check whether “Tomatoes” is available on the worksheet or not. This is done with the use of the IF and COUNTIF function. 

Step 1: Enter the formula =IF(COUNTIF(A2:A15, B2)=1, “Present”, “Absent”).

4How To Check If A Value Is In A Range In Google Sheets

Step 2: Hit the Enter key and a ” Present” statement is returned to the cell. 

5How To Check If A Value Is In A Range In Google Sheets

The IF function returned “Present” because the search key was present in the selected range. This formula doesn’t count the number of occurrences. It only signifies if the value is included in the range or not. 

Final Thoughts. 

The COUNTIF function is a very quick way to do this.

If you didn’t know how to use this function, ensure you learn and practice it because it would come in handy for your day to day spreadsheet tasks and operations.

Now you know How To Check If A Value Is In A Range In Google Sheets. I hope you found this short tutorial helpful. Enjoy. 

Abid Akon

Abid Akon

I am a tech content writer. I really love to talk about different Modern Technology. It is very important that people know how to fix their tech related problem. That’s why I am writing articles to share my tech knowledge with you.

Related Articles

MD Abid Akon

Abid Akon

Hi, I am Abid. I really love to talk about different Modern Technology. It is very important that people know how to fix their tech related problem. That’s why I’ve created this website to share my technology keeping knowledge with you. Welcome to ”abidakon.com”

Abid Akon

My Personal Favorites
YouTube Channel