Home > Net >  How to calculate occurrence of each item from an array within a cell in Google sheets
How to calculate occurrence of each item from an array within a cell in Google sheets

Time:09-18

I have list of items in an array and in another column, I have cells where merged items exists. I am trying to calculate how many of these items from the array exist in each cell. How can I do that on Google Sheets with functions?

A         B   C
a,b,c,d   3   b
c,b,x,y   2   c
x,y,z     0   d

Array exists in C column and number of occurrences in each cell under A column will be in B column. Could you please help me? Thanks!

CodePudding user response:

Try for line 2

=sum(arrayformula(countif(split(A2,","),$C$2:$C)))

and then duplicate for other lines

  • Related