ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Countif works, Sumproduct doesn't (https://www.excelbanter.com/excel-worksheet-functions/130428-countif-works-sumproduct-doesnt.html)

Jennifer

Countif works, Sumproduct doesn't
 
I have two functions here. The sumproduct function is just adding one more
set of criteria to look at when counting.

=COUNTIF(D:D,"*"&A1&"*")

=SUMPRODUCT((E1:E1000<EDATE(TODAY(),-6))*(D1:D1000="*"&A1&"*"))

Why does the Countif function work, but when I used it in a Sumproduct
function, it gives me zero? I know there should me more than zero.

Am I doing something wrong here?

Thanks,

Jennifer

T. Valko

Countif works, Sumproduct doesn't
 
Sumproduct won't work with wildcards in that manner.

Try it this way:

=SUMPRODUCT((E1:E1000<EDATE(TODAY(),-6))*(ISNUMBER(SEARCH(A1,D1:D1000))))

Biff

"Jennifer" wrote in message
...
I have two functions here. The sumproduct function is just adding one more
set of criteria to look at when counting.

=COUNTIF(D:D,"*"&A1&"*")

=SUMPRODUCT((E1:E1000<EDATE(TODAY(),-6))*(D1:D1000="*"&A1&"*"))

Why does the Countif function work, but when I used it in a Sumproduct
function, it gives me zero? I know there should me more than zero.

Am I doing something wrong here?

Thanks,

Jennifer




Bob Phillips

Countif works, Sumproduct doesn't
 
Because SP doesn't support wildcards

=SUMPRODUCT((E1:E1000<EDATE(TODAY(),-6))*(ISNUMBER(FIND(A1,D1:D1000))))



--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Jennifer" wrote in message
...
I have two functions here. The sumproduct function is just adding one more
set of criteria to look at when counting.

=COUNTIF(D:D,"*"&A1&"*")

=SUMPRODUCT((E1:E1000<EDATE(TODAY(),-6))*(D1:D1000="*"&A1&"*"))

Why does the Countif function work, but when I used it in a Sumproduct
function, it gives me zero? I know there should me more than zero.

Am I doing something wrong here?

Thanks,

Jennifer




Jennifer

Countif works, Sumproduct doesn't
 
Thanks. That works.

"T. Valko" wrote:

Sumproduct won't work with wildcards in that manner.

Try it this way:

=SUMPRODUCT((E1:E1000<EDATE(TODAY(),-6))*(ISNUMBER(SEARCH(A1,D1:D1000))))

Biff

"Jennifer" wrote in message
...
I have two functions here. The sumproduct function is just adding one more
set of criteria to look at when counting.

=COUNTIF(D:D,"*"&A1&"*")

=SUMPRODUCT((E1:E1000<EDATE(TODAY(),-6))*(D1:D1000="*"&A1&"*"))

Why does the Countif function work, but when I used it in a Sumproduct
function, it gives me zero? I know there should me more than zero.

Am I doing something wrong here?

Thanks,

Jennifer





T. Valko

Countif works, Sumproduct doesn't
 
You're welcome!

Biff

"Jennifer" wrote in message
...
Thanks. That works.

"T. Valko" wrote:

Sumproduct won't work with wildcards in that manner.

Try it this way:

=SUMPRODUCT((E1:E1000<EDATE(TODAY(),-6))*(ISNUMBER(SEARCH(A1,D1:D1000))))

Biff

"Jennifer" wrote in message
...
I have two functions here. The sumproduct function is just adding one
more
set of criteria to look at when counting.

=COUNTIF(D:D,"*"&A1&"*")

=SUMPRODUCT((E1:E1000<EDATE(TODAY(),-6))*(D1:D1000="*"&A1&"*"))

Why does the Countif function work, but when I used it in a Sumproduct
function, it gives me zero? I know there should me more than zero.

Am I doing something wrong here?

Thanks,

Jennifer








All times are GMT +1. The time now is 03:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com