The SUMPRODUCT function in Excel multiplies corresponding values in given arrays or ranges and then sums the results. It is often used for complex calculations, data analysis, and performing conditional summing without needing to use an array formula. This versatile function can handle multiple criteria and is particularly useful for tasks like weighted averages or summing products of data points across different ranges.
Sumproduct Formula:
=SUMPRODUCT(SalesTbl[Sales],--(TEXT(SalesTbl[Date],"mmm")="Jan"))
This Excel formula uses the SUMPRODUCT
function to calculate the sum of sales from a table, SalesTbl
, where the month of the date matches “Jan”. Let’s break it down step by step:
Watch more tutorials on Our Youtube Channel

Sumproduct Function Explanation:
SalesTbl[Sales]
:- This refers to the column in the
SalesTbl
table that contains the sales figures. It acts as an array of numbers.
- This refers to the column in the
SalesTbl[Date]
:- This refers to the column in the
SalesTbl
table that contains the dates associated with each sale.
- This refers to the column in the
TEXT(SalesTbl[Date],"mmm")
:- The
TEXT
function converts the date values into a text string representing the month in a three-letter format (e.g., “Jan” for January, “Feb” for February).
- The
TEXT(SalesTbl[Date],"mmm")="Jan"
:- This compares each converted month to the string “Jan”. The result is an array of
TRUE
orFALSE
values, whereTRUE
corresponds to dates in January andFALSE
to other months.
- This compares each converted month to the string “Jan”. The result is an array of
--(TEXT(SalesTbl[Date],"mmm")="Jan")
:- The double negative
--
converts theTRUE
andFALSE
values into1
and0
, respectively. This is necessary becauseSUMPRODUCT
works with numeric arrays, not logical values.
- The double negative
SUMPRODUCT(SalesTbl[Sales],--(TEXT(SalesTbl[Date],"mmm")="Jan"))
:SUMPRODUCT
multiplies corresponding elements of the two arrays:- The first array is the sales data:
SalesTbl[Sales]
. - The second array is the numeric representation of whether the month is January:
1
for “Jan” and0
for other months.
- The first array is the sales data:
- The multiplication results in:
- The sales value when the month is January (
SalesTbl[Sales] * 1
). 0
when the month is not January (SalesTbl[Sales] * 0
).
- The sales value when the month is January (
- Finally,
SUMPRODUCT
adds up all these results to give the total sales for January.
Sumproduct Function Example:
Date | Sales | TEXT(Date,"mmm") | TEXT(Date,"mmm")="Jan" | --(TEXT(Date,"mmm")="Jan") | Product (Sales * 1/0) |
---|---|---|---|---|---|
01/01/2024 | 100 | Jan | TRUE | 1 | 100 |
02/01/2024 | 200 | Jan | TRUE | 1 | 200 |
01/02/2024 | 150 | Feb | FALSE | 0 | 0 |
Result: 100+200=300100 + 200 = 300100+200=300.
Summary:
The formula calculates the sum of SalesTbl[Sales]
for rows where the month in SalesTbl[Date]
is January.
Want to join online or Recorded Class: click here