Using COUNT(IF( across multiple closed workbooks

bratwurst

New Member
Joined
Jul 13, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi all-

I've been searching through the forum and couldn't quite pinpoint my exact scenario.

I am aware xxxIF formulas don't work on referencing closed workbooks so I've been trying to utilize alternative methods.

I'm trying to find how many instances of a particular cell are found in a specific column range. For instance, this formula works:

Excel Formula:
=COUNT(IF('[filename.xlsx]Tab'!$C$5:$C$1000=B11,1))

But when trying to add additional IF statements/workbooks, I'm not getting accurate results:

Excel Formula:
=COUNT(IF('[filename.xlsx]Tab'!$C$5:$C$1000=B11, IF('[differentworkbook.xlsx]Tab'!$C$5:$C$1000=B11,1)))

The cell B11 is a text phrase (in this example it is Customer Inquiries).

Any idea what I'm doing wrong? I have about 12 closed workbooks to stick into this formula. All are identical. The current output of that 2nd formula is 1. It should be 3.

Thanks,
brat
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
@bratwurst Something like the following should work for you:

VBA Code:
=SUMPRODUCT(--('C:\Data\[filename.xlsx]Tab'!$C$5:$C$1000=B11)) + SUMPRODUCT(--('C:\Data\[differentworkbook.xlsx]Tab'!$C$5:$C$1000=B11)) + SUMPRODUCT(--('C:\Data\[anotherworkbook.xlsx]Tab'!$C$5:$C$1000=B11))
 
Upvote 0
Solution
Thanks all! Sorry, forgot to return to conclude the thread.

arthurbr, great info on that summary sheet link, thanks.

johnnyL -- this is exactly what I needed. forgot I could include "+" to attach formulas together. that did the trick.

Thanks again all.
 
Upvote 0

Forum statistics

Threads
1,215,063
Messages
6,122,934
Members
449,094
Latest member
teemeren

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