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

Options

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

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!