Count the number of occurrences of a text string in a range in Excel/Sheets
- ={(SUM(LEN(A2:A7)-LEN(SUBSTITUTE(A2:A7,"apple","")))/LEN("apple"))} 
- ={(SUM(LEN(A2:A7)-LEN(SUBSTITUTE(A2:A7,C9,"")))/LEN(C9))} 
- ={SUM(LEN(A2:A7)-LEN(SUBSTITUTE(UPPER(A2:A7),UPPER(C9),"")))/LEN(C9))}