Formulas and Functions

Formulas and Functions

Ask for help with your formula and find examples of how others use formulas and functions to solve a similar problem.

HAS function with multiple valid choices

I have created the following formula to calculate aging for a row that has not been completed:

=IF(AND(HAS([Issue Status]@row, "Pending FWCI Triage", "Pending DC Fix", "Pending Fix", "JIRA Ticket Opened")), [Date Issue Closed]@row = "", NETWORKDAYS(Date@row, TODAY()))

The test criteria I used is the following:

Positive:

Issue Status = Pending FWCI Triage

Date Issue Closed = Blank

Returned Value = 12 (which is correct)

Negative:

Issue Status = Closed

Date Issue Closed = 07/01/24

Returned Value = 12 (It should not have met the criteria to calculate the number of days and should be blank)

I'm not sure if I'm not using the HAS function correctly or if I'm missing something else.

Thank you in advance for any help you can provide.

Tags:

Best Answer

  • Overachievers Alumni
    Answer ✓

    You use HAS with multiple selection dropdown columns. Is that what you have here?

    If so, HAS also only takes one criteria. But, you can use OR to put together multiple possible HAS criteria:

    = IF( AND( OR( HAS([Issue Status]@row,"Pending FWCI Triage"), HAS([Issue Status]@row,"Pending DC Fix"), HAS([Issue Status]@row, "Pending Fix", HAS([Issue Status]@row, "JIRA Ticket Opened")), [Date Issue Closed]@row=""), NETWORKDAYS(Date@row,TODAY()))

    BRIAN RICHARDSON | PMO TOOLS AND RESOURCES | HE|HIM

    SEATTLE WA, USA

    IRON MOUNTAIN

Answers

  • Overachievers Alumni
    Answer ✓

    You use HAS with multiple selection dropdown columns. Is that what you have here?

    If so, HAS also only takes one criteria. But, you can use OR to put together multiple possible HAS criteria:

    = IF( AND( OR( HAS([Issue Status]@row,"Pending FWCI Triage"), HAS([Issue Status]@row,"Pending DC Fix"), HAS([Issue Status]@row, "Pending Fix", HAS([Issue Status]@row, "JIRA Ticket Opened")), [Date Issue Closed]@row=""), NETWORKDAYS(Date@row,TODAY()))

    BRIAN RICHARDSON | PMO TOOLS AND RESOURCES | HE|HIM

    SEATTLE WA, USA

    IRON MOUNTAIN

  • ✭✭✭

    Thank you Brian! I had a sneaking suspicion I needed to identify each condition separately, but wasn't sure.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!

Trending in Formulas and Functions