Average between two date columns based on a specific condition

Options

I want to calculate the average days between two date columns for a specific status (ABC).

I have a column for the average days named: "Avg Days (Req to Sent)" and this is my formula

=IF([Type]@row = "ABC", [Sent Date]@row - [Requested Date]@row, "Not ABC")


This works.


Now I want to calculate the average days from this column and ofcourse only the ones that have a number, because for the ones that don't satisfy the logic above it writes "Not ABC" in the cell. I put this formula in the sheet summary but I'm getting "#BLOCKED"

=AVG(COLLECT([Avg Days (Req to Sent)]:[Avg Days (Req to Sent)], [Avg Days (Req to Sent)]:[Avg Days (Req to Sent)], ISNUMBER(@cell)))

What am I doing wrong here?


Appreciate the help!!! :)

Answers

  • KPH
    KPH ✭✭✭✭✭✭
    Options

    How about an AVERAGEIF function @jerry123 ?

    Rather than collecting and averaging, you could use an average if the cell is a number.

    =AVERAGEIF([Avg Days (Req to Sent)]:[Avg Days (Req to Sent)], ISNUMBER(@cell))

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!