Excel Formulas to Check If the Cell Value is (X and Y)!!
Tags: excelformula, excelformulas
Published: 2021-02-24 11:43:48

---
title: Excel Formulas to Check If the Cell Value is (X and Y)!!
published: true
date: 2021-02-24 11:39:52 UTC
tags: ExcelFormula,Excelformulas
canonical_url: https://geekexcel.com/excel-formulas-to-check-if-the-cell-value-is-x-and-y/
---

The IF function is the main **logical function** in Excel. In this tutorial, we come up with a new formula based on the **IF AND statement**. Have you ever tried to test some values **if the cell value meets a specific condition (such as X and Y)**? Here are some cute formulas for you to solve this problem in Excel. Let’s jump into this article!! 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 cell is X and Y](https://geekexcel.com/wp-content/uploads/2021/02/If-cell-is-X-and-Y.png)](https://geekexcel.com/excel-formulas-to-check-if-the-cell-value-is-x-and-y/if-cell-is-x-and-y/#main)<figcaption id="caption-attachment-22111">If the cell is X and Y</figcaption>
## Generic Formula:

- Use the below formula to test the cells with X and Y in Excel.

**=[IF](https://geekexcel.com/use-if-function-in-microsoft-excel-365-simple-steps/)([AND](https://geekexcel.com/how-to-use-and-function-in-microsoft-excel-365/)(A1=”X”,B1=”Y”),”True Result”,”False Result”)**

## 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.
- **AND** – The [**AND Function**](https://geekexcel.com/how-to-use-logical-function-and-in-excel-365/) checks multiple Conditions and returns **[TRUE](https://geekexcel.com/use-true-function-in-microsoft-excel-365-simple-methods/) **if all the conditions are evaluated as true otherwise returns [**FALSE**](https://geekexcel.com/use-false-function-in-microsoft-excel-365-simple-methods/).
- **A1, B1**  – It is the input data from your worksheet.
- **Criteria (X, Y)** – It is the criteria that want to be found.
- **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.

## Example:

Refer to the below example image.

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

![Input Ranges](https://geekexcel.com/wp-content/uploads/2021/02/Input-Ranges-22.png)<figcaption id="caption-attachment-22112">Input Ranges</figcaption>

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

![Enter the formula](https://geekexcel.com/wp-content/uploads/2021/02/Enter-the-formula-24.png)<figcaption id="caption-attachment-22113">Enter the formula</figcaption>

- Finally, we will get the result in the selected cell as shown in the below image.

![Result](https://geekexcel.com/wp-content/uploads/2021/02/Result-27.png)<figcaption id="caption-attachment-22114">Result</figcaption>

## Verdict:

Hope you like this article about **how to test if the cell value is (X and Y) in Excel?** Let me know if you have any **doubts** regarding this article or any other **Excel/VBA** topic. 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:

- **[Excel Formulas to Sum the Values if Cells are Not Equal to Certain Value!!](https://geekexcel.com/excel-formulas-to-sum-the-values-if-cells-are-not-equal-to-certain-value/)**
- **[Excel Formulas to Test Multiple Cells and Return Non-Blank Value!!](https://geekexcel.com/excel-formulas-multiple-cells-and-return-non-blank-value/)**