How to define a non continuous range in COUNTIF

后端 未结 5 546
醉酒成梦
醉酒成梦 2020-12-06 05:49
   A    B   C

1  Β        Β
2  Β        Β
3  Α        Α
4  Α        Α
5  Β        Β
6  Α        Α
7  Α        B
8  Β        Β
9  Β        Β
10 Α        Α
11 Β               


        
5条回答
  •  余生分开走
    2020-12-06 06:15

    You can also declare a named range of non-contiguous ranges, but you must use the INDIRECT function in declaring the range. Otherwise, it will fail just like a normal, non-contiguous range.

    Declaring the range ("Range1") should have the "applies to" field read:

    =INDIRECT({"A1:B2","C4:F17"})
    

    Or use other named ranges:

    =INDIRECT({"Table1[Column1]","Table2[Column3]","Table4[Column2]")
    

    Then you can reference it like:

    =COUNTIF(Range1,"=Yes")
    

提交回复
热议问题