Search code examples
excelexcel-formulaexcel-2007excel-2003

Excel Multiple Selection Count


I want to know how to count some cells in excel based on its contents.

For example, I have something like this:

aa
ad
sa
fafv
xcv
aaw
gadf
aae

I want to count all if it begins or contains "aa".

How can this be acheived?


Solution

  • If list is in range A1:A8 use

    =COUNTIF(A1:A8,"*aa*")  ' for contains
    
    =COUNTIF(A1:A8,"aa*")  ' for begins with