Countif function with multiple sheets

christianbiker

Active Member
Joined
Feb 3, 2006
Messages
365
Can I use the "countif" function using a group of sheets as the range and the criteria on a separate sheet or manually typed in?

I have tried and continue to get the #VALUE error.

OR

Can I do the same thing and perform the "countif" function by using a specific value as the way to count?

Thanks...
 
thanks...

i have previously done both of your suggestions, excluding the sumproduct function, and continue to receive the same error. this is a couple of the formulas i have tried:

{=SUMPRODUCT(COUNTIF(INDIRECT("Day "&{25,26}&"!E8:E20"),K4))}
{=SUMPRODUCT(COUNTIF(INDIRECT("Day"&{25,26}&"!E8:E20"),K4))}
{=SUMCOUNTIF(INDIRECT("Day "&{25,26}&"!E8:E20"),K4))}
{=SUM(COUNTIF(INDIRECT("Day"&{25,26}&"!E8:E20"),K4))}

this is the original formula that i started with and received #VALUE! error:
=COUNTIF('Day 1:Day 31'!E8:E24,'Monthly Summary'!K4)

The formulas with SumProduct do not require control+shift+enter.

You need to observe the fact that the sheets such a formula refers to must exist. Check this...

The formula:

=COUNTIF('Day 1:Day 31'!E8:E24,'Monthly Summary'!K4)

is wrong/illegal (hence #VALUE!) because CountIf does not operate on 3d data.
 
Upvote 0

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
i had already tried the sumproduct formula with & without the {} signs and neither worked. same error. and the sheets do exist...31 of them in this format Day 1, Day 2, etc.

i also tried using the sheet name as it appears in VBA but that doesn't work.

i have tried what i know so far and honestly don't completely understand how all the formulas are or aren't supposed to work.

what i really need to know is what will/does work vs. what doesn't work.


thanks
 
Upvote 0
i had already tried the sumproduct formula with & without the {} signs and neither worked. same error. and the sheets do exist...31 of them in this format Day 1, Day 2, etc.

i also tried using the sheet name as it appears in VBA but that doesn't work.

i have tried what i know so far and honestly don't completely understand how all the formulas are or aren't supposed to work.

what i really need to know is what will/does work vs. what doesn't work.


thanks

This

=SUMPRODUCT(COUNTIF(INDIRECT("'"&Day "&{25,26}&"'!E8:E20"),K4))

should work as intended.
 
Upvote 0
it didn't work. it is telling me that the formula i typed contains an error however i simply pasted what you had provided to me:

=SUMPRODUCT(COUNTIF(INDIRECT("'"&Day "&{25,26}&"'!E8:E20"),K4))
 
Upvote 0
it didn't work. it is telling me that the formula i typed contains an error however i simply pasted what you had provided to me:

=SUMPRODUCT(COUNTIF(INDIRECT("'"&Day "&{25,26}&"'!E8:E20"),K4))

No wonder...

=SUMPRODUCT(COUNTIF(INDIRECT("'Day "&{25,26}&"'!E8:E20"),K4))
 
Upvote 0

Forum statistics

Threads
1,214,638
Messages
6,120,676
Members
448,977
Latest member
moonlight6

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