Contain items that I don't want to count

Craig Lemberger
Craig Lemberger ✭✭✭✭
edited 03/07/25 in Formulas and Functions

"pruned boxwood and boxwood hedges."

This is an an entry for a cell from a form. There are two search items here: "boxwood" and "boxwood hedges".

I have another cell attempting to note that boxwood (shrubs) were pruned separate from "boxwood hedges".

=IF(AND(CONTAINS("boxwood", [FN: Pruning]@row), (NOT(CONTAINS("boxwood Hedge", [FN: Pruning]@row))), Month@row > 5, Month@row < 11), 1, "")

of course this only brings nothing if the entry has "boxwood hedge".

If I only do the following (disregard the dates parameters)

IF(CONTAINS("boxwood", [FN: Pruning]@row), 1, ""), I get boxwood even if I only pruned boxwood hedges.

Up shot: how do I account for boxwood only when boxwood hedges are also noted?

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!