Forum Discussion

Mumzee's avatar
Mumzee
Copper Contributor
Mar 22, 2022

Going bananas trying to create a way to count multiple names in a column

Have a simple spreadsheet

in one column I have a bunch of fruit names about 30 different ones total input in about 250 rows

trying to do a count if 5 separate names to amount to the number 5 n a cell n a different column

have tried =countif(d2:d250”apple”, “orange”, “lemon”, “green grape”)

=sumcountifs(d2:d250{apple”, “orange”, “lemon”, “green grape”})

but no luck 
please, can someone help me!

 

 

5 Replies

  • Mumzee's avatar
    Mumzee
    Copper Contributor
    Thank you everyone. All worked out as needed 😍
  • mtarler's avatar
    mtarler
    Silver Contributor
    the simplest way (conceptually) is
    =countif(d2:d250,”apple”)+countif(d2:d250, “orange”)+countif(d2:d250,“lemon”)+countif(d2:d250,“green grape”)
    another option using arrays is:
    =sum(countif(d2:d250,{”apple”, “orange”, “lemon”, “green grape”}))
    • Mumzee's avatar
      Mumzee
      Copper Contributor

      mtarler 

      thank you I will try 1st as sure 2nd choice is what I was trying but kept giving me error.   
      will post tomorrow results 

      and will try both just to see 

      🥰

Resources