Count all fields in an column, except for n specified range

前端 未结 1 1000
半阙折子戏
半阙折子戏 2021-01-25 20:12

I am trying to count all the field in an entire column except for n specified range. I need to select the entire column to cater for future expansion

currently i am tryi

1条回答
  •  北海茫月
    2021-01-25 20:53

    Which version of Excel? In Excel 2007 or later try COUNTIFS (with an "S"), i.e.

    =COUNTIFS(B:B,"<>ASY999",B:B, "<>ASY002",B:B,"<>CIB001",B:B,"<>")

    I assume ASY999 etc are text values.....

    In Excel 2003 or earlier you can use SUMPRODUCT but you need to restrict the range rather than using the whole column so assuming data in rows 2 to 1000 try

    =SUMPRODUCT(ISNA(MATCH(B2:B1000,{"ASY999","ASY002","CIB001"},0))*(B2:B1000<>""))

    0 讨论(0)
提交回复
热议问题