Excel Formulas to Check If the Cells Contain This or That!!
Tags: excelformula, excelformulas
Published: 2021-02-16 07:02:39

---
title: Excel Formulas to Check If the Cells Contain This or That!!
published: true
date: 2021-02-16 04:35:56 UTC
tags: ExcelFormula,Excelformulas
canonical_url: https://geekexcel.com/excel-formulas-check-if-cells-contain-this-or-that/
---

In the previous post, we have learned how to **[Check the Values If Cells Begin with Given Criteria](https://geekexcel.com/excel-formula-if-cells-begin-with-given-criteria/)**. Today, I will introduce some formulas to **check if the cells contain either this or that in Excel**. Let’s see them below!! Get an official version of ** MS Excel**  from the following link: [https://www.microsoft.com/en-in/microsoft-365/excel](https://www.microsoft.com/en-in/microsoft-365/excel)

![If cells contain either this or that](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/02/If-cells-contain-either-this-or-that-1.png)<figcaption id="caption-attachment-21929">If cells contain either this or that</figcaption>

## Generic Formula:

- To check to see if a cell contains more than one substring, use the below formula.

**=[IF](https://geekexcel.com/use-if-function-in-microsoft-excel-365-simple-steps/)([SUM](https://geekexcel.com/sum-function/)([COUNTIF](https://geekexcel.com/formulas-to-count-with-countif-function-in-excel-office-365/)(B5,{“\*text1\*”,”\*text2\*”})),”x”,””)**

## Syntax Explanations:

- **IF** – In Excel, the **[IF function](https://geekexcel.com/use-if-function-in-microsoft-excel-365-simple-steps/)** helps to return one value for a **[TRUE](https://geekexcel.com/use-true-function-in-microsoft-excel-365-simple-methods/)** result, and another for a **[FALSE](https://geekexcel.com/use-false-function-in-microsoft-excel-365-simple-methods/)** result.
- **SUM** – This function will add values to the cells. Read more on the **[SUM function](https://geekexcel.com/sum-function/)**.
- **COUNTIF** – The **[COUNTIF Function](https://geekexcel.com/formulas-to-count-with-countif-function-in-excel-office-365/)** helps to count the number of cells that meet a single condition or criteria.
- **Comma symbol (,)** – It is a separator that helps to separate a list of values.
- **Parenthesis ()** – The main purpose of this symbol is to group the elements.

## Practical Example:

Refer to the below example. Here we are going to check the values in the cells that contain either this or that.

- First, we will give the input values in **Column B**.

![Input Ranges](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/02/Input-Ranges-12.png)<figcaption id="caption-attachment-21920">Input Ranges</figcaption>

- Then, apply the given formula to the **[formula bar](https://geekexcel.com/how-to-use-formula-bar-for-various-purpose-in-excel-365/)** section.

![Enter the formula](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/02/Enter-the.png)<figcaption id="caption-attachment-21933">Enter the formula</figcaption>

- Finally, we will get the results in the selected cell as per the below image.

![Result](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/02/EXCEL_Q4sKHGj2ju-1.png)<figcaption id="caption-attachment-21927">Result</figcaption>

## Closure:

In this article, we have explained the simple formula to **check if cells contain either this or that in Excel**. If you have any **questions** , feel free to **comment**. Thank you so much for visiting our site!! Click here to know more about **[Geek Excel](https://geekexcel.com/) **and [**Excel Formulas**](https://geekexcel.com/excel-formula/) **!! **

### Related Articles:

- **[Check If Cell Contains All Values from a Range in Excel Office 365!!](https://geekexcel.com/check-if-cell-contains-all-values-from-a-range-in-excel-office-365/)**
- **[Excel Formulas to Match Occurrence Does not begin with Specific Value!!](https://geekexcel.com/excel-formulas-match-occurrence-does-not-begin-with/)**