If Question

=IF([PO Status]@row = "Approved", [Purchase Order No.]@row),IF([Multiple Invoices]@row="true",""

What am I doing wrong?


  • Samuel Dowdy Jr.
    Samuel Dowdy Jr. ✭✭✭✭✭

    I basically have a auto number for the PO column that is hidden, if the po is approved then the PO (by Office) is filled to match the auto number. But, if the po has multiple invoices when it comes in I dont want the new line to generate a PO number.

  • Dale Murphy
    Dale Murphy ✭✭✭✭✭✭

    @Samuel Dowdy Jr. Other than bracket management, it looks okay. What result are you getting?

    Try this (it works in North America):

    =IF([PO Status]@row = "Approved", [Purchase Order No.]@row, IF([Multiple Invoices]@row="true",""))

    Just beware that the formula evaluates the "Approved" state first. So it will ignore the "Multiple Invoices" flag if PO Status == Approved.


  • Jeff Reisman
    Jeff Reisman ✭✭✭✭✭✭

    I think you'll want to add the AND function into your IF:

    =IF(AND([Multiple Invoices]@row= "false", [PO Status]@row = "Approved"), [Purchase Order No.]@row, "")

    The AND function tells the formula to evaluate both criteria first, and they both have to be true to set the value. So if Multiple Invoices is unchecked, and PO Status is approved, set the value to the [Purchase Order No.]@row, otherwise, leave it blank.

    Note: Be sure to close out your AND statement with an end parentheses, before going on to your true condition. In the above, it's right after "Approved".


    Jeff Reisman

    Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages

    If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!