SUMPRODUCT WITH COUNTIFS for MULTIPLE WORKSHEETS with one criteria

Derick63

Board Regular
Joined
Apr 6, 2018
Messages
76
Office Version
  1. 365
Hello Everyone,

I can't seem to figure this one out and I've looked around for an answer to no avail.

I have 13 sheets, 12 of them, January through December, have the same layout and formatting.
I have a named range of the months called Sheets on a sheet called Helper Sheet

The first sheet, TD4 Data, in cell Y2, I'm looking to find the employees name, listed in A2, in all sheets within the range C9:C133 then count the number of times 41.25 and 33.00 in range L9:L133 in the 12 sheets for the employee in A2.

Here's what I have but producing a #Value in Y2. Would I need to use an array somewhere in the formula?

Thanks in advance

Code:
=IF($A2="","",SUMPRODUCT((COUNTIFS(INDIRECT("'"&Sheets&"'!$L$9:$L$133"),"41.25"))+(COUNTIFS(INDIRECT("'"&Sheets&"'!$L$9:$L$133"),"33")),INDIRECT("'"&Sheets&"'!$C$9:$C$133"),$A2))

I also tried this and got the same #Value
Code:
=IF($A2="","",SUMPRODUCT((COUNTIFS(INDIRECT("'"&Sheets&"'!$L$9:$L$133"),{41.25,33})),INDIRECT("'"&Sheets&"'!$C$9:$C$133"),$A2))
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
You were close...

Code:
=IF($A2="","",SUMPRODUCT(COUNTIFS(INDIRECT("'"&Sheets&"'!$L$9:$L$133"),{41.25,33},INDIRECT("'"&Sheets&"'!$C$9:$C$133"),$A2)))

Hope this helps!
 
Upvote 0
You were close...

Code:
=IF($A2="","",SUMPRODUCT(COUNTIFS(INDIRECT("'"&Sheets&"'!$L$9:$L$133"),{41.25,33},INDIRECT("'"&Sheets&"'!$C$9:$C$133"),$A2)))

Hope this helps!

Hey Domenic. That worked. Thanks so much.

**** Brackets!!!!!!
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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