Incorporating ISDATE into Formula to average the time between various dates if conditions are met

I have a formula for calculation of a row by row average of review cycles, where each row can have 3 review cycles.

I'm trying to figure out how to incorporate the "ISDATE" Function into this formula such that if one of the review cycles is unnecessary and a user enters "N/A" the formula will still calculate correctly.

Currently I have:

=AVG(IF(ISDATE([First Cycle End]@row), [First Cycle End]@row, "") - IF(ISDATE([First Cycle Start]@row), [First Cycle Start]@row, ""), IF(ISDATE([Second Cycle End]@row), [Second Cycle End]@row, ""), - IF(ISDATE([Second Cycle Start]@row), [Second Cycle Start]@row, "") ……………)

But I'm getting a syntax error

Tags:

Best Answer

  • jaimelynn0814FEB
    jaimelynn0814FEB ✭✭✭✭
    edited 06/13/24 Answer ✓

    Does this work?

    =AVG(IF(AND(ISDATE([First Cycle Start]@row), ISDATE([First Cycle End]@row)), [First Cycle End]@row - [First Cycle Start]@row, ""),IF(AND(ISDATE([Second Cycle Start]@row), ISDATE([Second Cycle End]@row)), [Second Cycle End]@row - [Second Cycle Start]@row, ""),IF(AND(ISDATE([Third Cycle Start]@row), ISDATE([Third Cycle End]@row)), [Third Cycle End]@row - [Third Cycle Start]@row, ""))….

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!