How to find the number of days to process with multiple IF(ISBLANK)

Hi! I'm trying to create a formula for the number of days to process invoices. This is my current formula that works perfect:

=IF(ISBLANK([REVISED INVOICE DATE]@row), [SENT TO PM DATE]@row - [OBTAINED INVOICE DATE]@row, [SENT TO PM DATE]@row - [REVISED INVOICE DATE]@row)

However I have since added another column that I need to add to this formula if there is a value in the cell. This is how I've currently edited the formula but it is returning incorrect argument.

=IF(OR(ISBLANK([REVISED INVOICE DATE]@row, ISBLANK([EMAILED LM FOR CLARIFICATION]@row))), "", [SENT TO PM DATE]@row - [OBTAINED INVOICE DATE]@row, [SENT TO PM DATE]@row - [REVISED INVOICE DATE]@row, [SENT TO PM DATE]@row - [EMAILED LM FOR CLARIFICATION]@row)

So I need to know how many days it has taken to process the invoice if there is not a revised date, or a emailed LM for clarification date then it will subtract "Sent to PM date - Obtained Invoice Date". If there are values in the Revised Invoice Date, and Emailed LM for Clarification date those dates need to be included in the value as well. I'm just not sure how to have a formula produce a value if there is a Revised Invoice Date AND a Emailed LM for Clarification date.

Thanks in advance!

Best Answer

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭
    Answer ✓

    Try this instead:

    =[Sent To PM Date]@row - IF([Revised Invoice Date]@row <> "", [Revised Invoice Date]@row, IF([Obtained Invoice Date]@row <> "", [Obtained Invoice Date]@row, [Emailed LM For Clarification]@row))

    Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!

    CERTIFIED SMARTSHEET PLATINUM PARTNER

    10xViz.com

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!