To get the count in N1 put:
=COUNTIF($A:$A,"*" & M1 & "*")
then you can use this formula to find the value with the most:
=INDEX(M:M,MATCH(MAX(N:N),N:N,0))
In one formula, with your prefixes still in M1:M3, use this array formula:
=INDEX($M$1:$M$3,MATCH(MAX(COUNTIF($A$1:$A$4,"*"&$M$1:$M$3&"*")),COUNTIF($A$1:$A$4,"*"&$M$1:$M$3&"*"),0))
Being an array it needs to be confirmed with Ctrl-Shift-Enter. If done properly then Excel will put {} around the formula.
With array formulas we want to reference only the ranges with data, and not use full column references.
برچسب:
نویسنده: استخدام کار