Verification IF Formula

Options

I am trying to create a verification IF formula that will check two cells and they need to both be true to output "Good" or false "Verify". I making this to find errors more easily in forms they are filling out. We have them putting incorrect packaging for production lines that can't make that product. (Yes I could logic this on forms but it would cause a different issue that would make fixing mistakes longer and harder to find. So I want to stick with this formula)

=IF((OR(AND(([Production Line]@row = OR("T", "G", "H")), [Type of Package]@row = "Pouch"), AND(([Production Line]@row = OR("S", "U", "C", "F")), [Type of Package]@row = "Bag"))), "Good", "Verify")


Production Line & Matching Type of Package:

T, G, H = Pouch

S, U, C, F = Bag

if mixed up then would output "Verify"

Currently the formula states #Invalid Operation. But any slight adjustments I makes it continues not to work!

Any help would be appreciated.

Answers

  • Kelly Drake
    Kelly Drake Overachievers Alumni
    Options

    You dont' have the right syntax you can't do this "OR("T", "G", "H")" . And I can't quite figure out the syntax of the logic you're trying to layout.

    If this lines up with the logic you're trying to implement - then use the formula below.

    IF Production Line = T, G, or H and Type of Package = Pouch, OR Production line = S, U, C or F and Type of Package = Bag then Good, otherwise verify

    =IF(OR(AND(OR([Production Line]@row = "T", [Production Line]@row = "G", [Production Line]@row = "H"), [Type of Package]@row = "Pouch"), AND(OR([Production Line]@row = "S", [Production Line]@row = "U", [Production Line]@row = "C", [Production Line]@row = "F"), [Type of Package]@row = "Bag"))), "Good", "Verify")

    Kelly Drake (she/her/hers)

    STARBUCKS COFFEE COMPANY| business optimization product manager

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!