CountIfs to Sumproduct for Closed workbooks

chris186h

Board Regular
Joined
Mar 18, 2015
Messages
111
Hello all, im struggling with this formula and im unsure how to use sumproducts.
I need it to count the number of matches in a closed workbook.
Close workbook Ranges. Equipment'!$BC:$BC Containes words that should match with M11 in the open workbook. Equipment'!$BD:$BD contains dates which should match O9 in the open workbook.

=COUNTIFS('C:\Site\Site\[Data.xlsm]Equipment'!$BC:$BC,M11,'C:\Site\Site\[Data.xlsm]Equipment'!$BD:$BD,"="&O9)

I want a count of how both match
Many thanks in advanced
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
A literal translation would be this:

=SUMPRODUCT(('C:\Site\Site\[Data.xlsm]Equipment'!$BC:$BC=M11)*('C:\Site\Site\[Data.xlsm]Equipment'!$BD:$BD=O9))

but you should really try to avoid entire columns when using this sort of SUMPRODUCT contruction, so perhaps:

=SUMPRODUCT(('C:\Site\Site\[Data.xlsm]Equipment'!$BC$1:$BC$10000=M11)*('C:\Site\Site\[Data.xlsm]Equipment'!$BD$1:$BD$10000=O9))

You can adjust the number of rows in the blue sections, but they should both be the same.
 
Upvote 0
A literal translation would be this:

=SUMPRODUCT(('C:\Site\Site\[Data.xlsm]Equipment'!$BC:$BC=M11)*('C:\Site\Site\[Data.xlsm]Equipment'!$BD:$BD=O9))

but you should really try to avoid entire columns when using this sort of SUMPRODUCT contruction, so perhaps:

=SUMPRODUCT(('C:\Site\Site\[Data.xlsm]Equipment'!$BC$1:$BC$10000=M11)*('C:\Site\Site\[Data.xlsm]Equipment'!$BD$1:$BD$10000=O9))

You can adjust the number of rows in the blue sections, but they should both be the same.

That worked perfectly. Thankyou RoryA.
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,731
Members
448,987
Latest member
marion_davis

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