convert countifs to sumproduct formula

cgreen

Active Member
Joined
Aug 14, 2002
Messages
293
I have a formula being used in ms2007
=COUNTIFS(ALL_OPEN!M:M,"",ALL_OPEN!Q:Q,"<=14"). The answer I receive is 1007, which is the correct answer.

Countifs does not work in ms2003; therefore, I am trying to use
=SUMPRODUCT(--(ALL_OPEN!$M$2:$M$10000=""),--(ALL_OPEN!$Q$2:$Q$10000<=14)) in its place. The answer I receive for the sumproduct formula is 3718, which is wrong.

What am I doing wrong???
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Unlike COUNTIFS the SUMPRODUCT formula will identify any blanks in column Q as zero, so that formula will count completely blank rows, try adding another condition to check that Q isn't blank, i.e.

=SUMPRODUCT(--(ALL_OPEN!$M$2:$M$10000=""),--(ALL_OPEN!$Q$2:$Q$10000<=14),--(ALL_OPEN!$Q$2:$Q$10000<>""))
 
Upvote 0
Your SUMPRODUCT formula looks right to me. Can you get different results with a smaller range? If so please post what's in coluns M and Q.
 
Upvote 0
If I have something other than blank data in column M, then everything works greats .. per this example:
=SUMPRODUCT(--(ALL_OPEN!$M$2:$M$10000=TEXT($A5,0)),--(ALL_OPEN!$Q$2:$Q$10000<=14))

When I try to get a count of blank cells I have a problem.

column M contains text data like 261, 201, or a blank cell with no spaces. Column Q contains numbers bysubtracting a date from the date the data was created. Such as 1, 10, 14, 265, etc to symbolise a day count.

Does that answer your question?
 
Upvote 0
Yes, after I posted my reply ..... works great. The talent of this board amazes me every time.

Thank you
 
Upvote 0

Forum statistics

Threads
1,215,268
Messages
6,123,975
Members
449,137
Latest member
yeti1016

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top