Countif to Sumproduct

Turbo68

Board Regular
Joined
Jan 31, 2014
Messages
118
I am trying to get a sheet to update counts from another workbook automatically. The countifs formula is working fine:

=COUNTIFS('G:\[shiplog.xls]Returns'!$C$1:$C$65536,">" & DATE,'G:\[shiplog.xls]Returns'!$D$1:$D$65536,A11,'G:\[shiplog.xls]Returns'!$E$1:$E$65536,B11,'G:\[shiplog.xls]Returns'!$F$1:$F$65536,C11,'G:\[shiplog.xls]Returns'!$A$1:$A$65536,">5999",'G:\[shiplog.xls]Returns'!$W$1:$W$65536,"")

What the problem is that I have to have that data workbook open to update my sheet, otherwise I get #VALUE errors. I know that I can use SumProduct but I can't get all my criteria to work.

I have this working but for some reason, it finds nothing when I add the rest of the criteria.

=SUMPRODUCT(([shiplog.xls]Returns!$C:$C>DATE)*([shiplog.xls]Returns!$D:$D=A10)*([shiplog.xls]Returns!$E:$E=B10))

Can someone assist in transposing this Countif to SumProduct?

Thanks in advance.

Mike
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Try this

=SUMPRODUCT(([shiplog.xls]Returns!$C$1:$C$1000> TODAY())*([shiplog.xls]Returns!$D$1:$D$1000=A11)*([shiplog.xls]Returns!$E$1:$E$1000=B11)*([shiplog.xls]Returns!$F$1:$F$1000=C11)*([shiplog.xls]Returns!$A$1:$A$1000>5999)*([shiplog.xls]Returns!$W$1:$W$1000=""))

Note: I recommend using a row number as far as you have data, if you use the entire column the sheet can be slow.
 
Upvote 0
You can use Alt + Enter to separate each line from the formula, that way it can look like this, the formula can be better understood and still working.

=SUMPRODUCT(([shiplog.xls]Returns!$C$1:$C$1000> TODAY())*
([shiplog.xls]Returns!$D$1:$D$1000=A11)*
([shiplog.xls]Returns!$E$1:$E$1000=B11)*
([shiplog.xls]Returns!$F$1:$F$1000=C11)*
([shiplog.xls]Returns!$A$1:$A$1000>5999)*
([shiplog.xls]Returns!$W$1:$W$1000=""))
 
Upvote 0
Thanks.... I was just going to post what I came up with finally and looks similar:

=SUMPRODUCT(('G:\[shiplog.xls]Returns'!$D$1:$D$65536=A10)*1,
('G:\[shiplog.xls]Returns'!$E$1:$E$65536=B10)*1,
('G:\[shiplog.xls]Returns'!$F$1:$F$65536=C10)*1,
('G:\[shiplog.xls]Returns'!$W$1:$W$65536="")*1,
('G:\[shiplog.xls]Returns'!$C$1:$C$65536>DATE)*1,
('G:\[shiplog.xls]Returns'!$A$1:$A$65536>5999)*1)



Thanks again DanteAmor!
 
Upvote 0
I'm glad to help you. Thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,213,491
Messages
6,113,963
Members
448,536
Latest member
CantExcel123

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