Please note that this is an array formula. An array formula can perform
multiple calculations and then return either a single result or multiple
results. Array formulas act on two or more sets of values known as array
arguments. Each array argument must have the same number of rows and columns.
You create array formulas in the same way that you create other formulas,
except you press CTRL+SHIFT+ENTER to enter the formula. If successful in
'Formula Bar' you can notice the curly braces at both ends like "{=<formula>}"
=SUM(IF(LEFT(A1:A20,3)="ill",IF(--SUBSTITUTE(A1:A20,"ILL",)<=8,--SUBSTITUTE(A1:A20,"ILL",))))
If this post helps click Yes