How to use SUMPRODUCT to count days in a array of dates in Excel

I use the functions count and countif very frecuenly in my Excel sheets.

Few weeks ago, I needed to count the days of a array of dates and I couldn’t use other column to extract the day of this dates with the day() function.

For this reason I used the SUMPRODUCT funtion.

The SUMPRODUCT function description is: “Returns the sum of the products of corresponding ranges or arrays”, but SUMPRODUCT has more features.

One of this characteristics is count a range with a function inside the own function.

For Example: =SUMPRODUCT(–(DAY(D1:D10)=1))

This Example count all the days number “1” in the array D1:D10:

SUMPRODUCT is a very powerful function. You can read more information in:

Excel SUMPRODUCT Function
What is Excel SUMPRODUCT formula and how to use it? (In This post you can looking for the use of “–” simbol)


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: