Excel Formulas Used to Calculate the Subtotal by Invoice Number!!
Tags: excelformula, excelformulas
Published: 2020-11-21 09:01:57

---
title: Excel Formulas Used to Calculate the Subtotal by Invoice Number!!
published: true
date: 2020-11-21 08:50:31 UTC
tags: ExcelFormula,Excelformulas
canonical_url: https://geekexcel.com/excel-formulas-used-to-calculate-the-subtotal-by-invoice-number/
---

In this tutorial, we will explain the simple **Formulas used to calculate the subtotal by invoice number in Excel Office 365**. Let’s get started!! 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 calculate subtotal by invoice number](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/11/Formulas-to-calculate-subtotal-by-invoice-number.png)<figcaption id="caption-attachment-17820">Formulas to calculate subtotal by invoice number</figcaption>
## General Formula:

- To calculate the subtotal by invoice number in Excel, use the below formula.

**=[IF](https://geekexcel.com/use-if-function-in-microsoft-excel-365-simple-steps/)(COUNTIF(range,criteria)=1,SUMIF(range,criteria,sum range,””)**

## Syntax Explanations:

- **IF** – The Excel** [IF function](https://geekexcel.com/use-if-function-in-microsoft-excel-365-simple-steps/)** return one value for a TRUE result, and another for a FALSE result.
- **COUNTIF** – This function will help to count the number of cells that meet a single criterion or condition in Excel.
- **SUMIF** – It will return the sum of cells that meet a single condition. Read more on the **SUMIF Function**.
- **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.
- **Range** – It represents the input range from your workbook.
- **Criteria**  – It is the condition that is used to count the values.

## Example:

- In the below image, we will give the input values in **Column B** and **Column D**.
- Then, enter the given formula in the formula bar section.
- Finally, it will calculate the subtotal by the invoice number and show the result in **Cell F4** as per the below image.

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

## Conclusion:

In this article, you can get to know the **formulas used to calculate the subtotal by the invoice number in Excel Office 365.** Hope that this article is useful to you. If you have any **doubts,** don’t forget to share it with us. Thank you so much for Visiting Our Site!! Continue learning on **[Geek Excel](https://geekexcel.com/)!! **and [**Excel Formulas**](https://geekexcel.com/excel-formula/) **!!**

### Read Also:

- **[Excel Formulas to Count the Cells Less than a Given Number!!](https://geekexcel.com/excel-formulas-to-count-the-cells-less-than-a-given-number/)**
- **[Formulas for Counting the Cells Greater than a Given Values in Excel!!](https://geekexcel.com/formulas-for-counting-the-cells-greater-than-a-given-values-in-excel/)**
- **[How to Find the Largest Value Smaller than a Specified Number in Excel?](https://geekexcel.com/how-to-find-the-largest-value-smaller-than-a-specified-number-in-excel/)**
- [**Formulas to Count with Percentage Breakdown in Excel Office 365!!**](https://geekexcel.com/formulas-to-count-with-percentage-breakdown-in-excel-office-365/)