Excel Formulas to Sum the Values in the Cells that Equal to either X or Y!!
Tags: excelformula, excelformulas
Published: 2020-12-01 10:01:04

---
title: Excel Formulas to Sum the Values in the Cells that Equal to either X or Y!!
published: true
date: 2020-12-01 08:46:04 UTC
tags: ExcelFormula,Excelformulas
canonical_url: https://geekexcel.com/excel-formulas-to-sum-the-values-in-the-cells-that-equal-to-either-x-or-y/
---

In this article, we will see the basic **formula used to sum the values in the cells that equal to either one value or another (i.e. equal to X or Y)in Excel Office 365**. Let’s get 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)

[![Formulas to sum values that are equal to X or Y](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/12/EXCEL_XzY2ktLwbs.png)](https://geekexcel.com/?attachment_id=18394#main)<figcaption id="caption-attachment-18394">Formulas to sum values that are equal to X or Y</figcaption>
## General Formula:

- The below formula will help to sum the values in the cells that equal to X or Y.

**=SUMIF(range,”X”,value)+SUMIF(range,”Y”,value)**

## Syntax Explanations:

- **SUMIF** – The Excel **SUMIF Function** will help to sum the cells that meet a single condition or criteria.
- **(X and Y) Criteria**– It is the specific text or criteria that is used to sum the values.
- **Range** – It represents the input range given in the worksheet.
- **Plus operator (+)** – This symbol is used to add the values.
- **Comma symbol (,)** – It is a separator which helps to separate a list of values.
- **Parenthesis ()** – The main purpose of this symbol is to group the elements.
- **Value** – It represents the input values given in the worksheet.

## Example:

- Now, we are going to see how to sum the values in the cells that equal to X or Y.
- In the below image, we will enter the input values in **Column C** and **Column D**.
- After that enter the given formula in the formula bar section.
- Finally, we will get the result in the Selected **Cell G3**.

![Example](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/12/Example1.png)<figcaption id="caption-attachment-18395">Example</figcaption>

## Wind-Up:

From this tutorial, you can get to know how to use the **formula to sum the values in the cells that equal to either X or Y in Excel Office 365**. Hope you like this article. If you feel this article is useful to you, then leave **feedback** in the below comment box. Thank you so much for Reading!! Keep learning on **[Geek Excel](https://geekexcel.com/)!! **and [**Excel Formulas**](https://geekexcel.com/excel-formula/) **!!**

### Read Also:

- **[Formulas to Sum the Values by a Week Number in Excel Office 365!!](https://geekexcel.com/formulas-to-sum-the-values-by-a-week-number-in-excel-office-365/)**
- **[Excel Formulas to Sum columns based on Adjacent criteria!!](https://geekexcel.com/excel-formulas-to-sum-columns-based-on-adjacent-criteria/)**
- [**Excel Formulas to Sum the Values by Year using SUMIFS!!**](https://geekexcel.com/excel-formulas-to-sum-the-values-by-year-using-sumifs/)