Refer below image:
Array formula in cell C4:
=IF(NOT(ISNUMBER(SEARCH("*Trim/Shake*",A2:A10))),A2:A10)
This excludes "Trim/Shake" while accessing cells in the range A2:A10. The formula returns the values: {"14g", FALSE, FALSE, "14g", "24g", "Trim 14g", "15g Shake", FALSE, "Shake 14g"}
In case you wish to use the formula to count the number of cells in A2:A10 which include "14g" but EXCLUDE "Trim/Shake", use below array formula in cell C2:
=SUM(--ISNUMBER(SEARCH("*14g*",IF(NOT(ISNUMBER(SEARCH("*Trim/Shake*",A2:A10))),A2:A10))))
Note: both formulas are array formulas (CTRL+SHIFT+ENTER):
Regards,
Amit Tandon