COUNTIF INDIRECT Multiple Criteria

Jtucker10278

Board Regular
Joined
May 14, 2017
Messages
62
Office Version
  1. 365
Platform
  1. Windows
Need help with the formula

=COUNTIF(C12:H23,1)+COUNTIF(C12:H23,2)

Where C13:H23 = Named Range Week_1

I already know indirect has its drawbacks im just doing some quick and dirty analysis.

Thanks for the help
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
The range in your formula is C12:H13 (twice) but your description states C13:H23. So which is correct?

There's no INDIRECT() mentioned in your formula, that's a normal range.

And I can't see you've stated a problem either ?

"Need help with a formula"
What does that mean?
 
Last edited:
Upvote 0
Oops that's embarrassing (trying to do to may things at once)

so im trying to make this formula

=COUNTIF(C12:H23,1)+COUNTIF(C12:H23,2) C12:H23 = Named range Week_1

work somthing like

=COUNTIF((INDIRECT(A1)),1)+COUNTIF((INDRECT(A1)),2) A1 = Week_1


big picture, Im trying to count all the values = to 1,2 in named range Week_1 (and in Week_2, Week_3, ect)

Thanks Again



 
Upvote 0
That will work so long as the named range is NOT dynamic (no use of offset, counta etc..) Only a direct reference like =$C$12:$H$23
Although you misspelled INDRECT the 2nd time...

But you're a bit overkill with the parens..
=COUNTIF((INDIRECT(A1)),1)+COUNTIF((INDRECT(A1)),2)
Can just be
=COUNTIF(INDIRECT(A1),1)+COUNTIF(INDIRECT(A1),2)
 
Last edited:
Upvote 0
On a side note, here's a shortcut to the multiple criteria..

=COUNTIF(C12:H23,1)+COUNTIF(C12:H23,2)

Try

=SUM(COUNTIF(C12:H23,{1,2}))
With Indirect
=SUM(COUNTIF(INDIRECT(A1),{1,2}))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,875
Members
452,363
Latest member
merico17

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