Forum Discussion

Morgan McGuire's avatar
Morgan McGuire
Copper Contributor
Sep 24, 2017

formula

I need the formula to find how many times with in a certain amount of cells that neither two words show up. Usually you use a COUNTIF function to find how many times a word shows up but im not sure how to find if two words don't show up.

    • Morgan McGuire's avatar
      Morgan McGuire
      Copper Contributor

      I have a bunch of fruit names for example: orange, banana, pear, and apple. I need to know the function for it saying neither "Apple" or "Orange" within those cells. 

      • IngeborgHawighorst's avatar
        IngeborgHawighorst
        MVP

        Like this maybe?

         

        =COUNTA(B2:B10)-SUM(COUNTIFS(B2:B10,{"*apple*","*banana*"}))

         

        In words: count the cells that have either the word "apple" OR the word "banana" and subtract the result from the total count of the cells.

         

         

Resources