Home > Back-end >  Is there an excel function for selecting an item inside a cell and then summing it across a column
Is there an excel function for selecting an item inside a cell and then summing it across a column

Time:07-07

Essentially I have a list of food items in one column and the various categories they fall into (contains meat, contains fish, is eaten cold, is eaten warm, is water) in another column. Food items can fall into various categories, and each category has its designated number, ranging from 1-5. To make things fun, lets suppose that when the designations were assigned, they were mixed (i.e., not placed in any particular order such as by ascending/ or descending number), but always following the format of #,# (with no spaces between numbers or commas). What formula can be used to 1) count all instances where there is a designated number within a column and 2)sum up these instances and output the total?

I tried using

=Count(Find("1"Column Range))

but this does not work in a situation where I have 20 categories, given that the number 1 repeats throughout the 'teens

enter image description here

CodePudding user response:

Try COUNTIF() twice. One for number values, another for comma delimited values.

=COUNTIF($C$3:$C$10,"*" & G3 & "*") COUNTIF($C$3:$C$10,G3)

enter image description here

  • Related