Averageif within a date range

Options

I am trying to get the average cost of contracts written within each month of the year.

=AVERAGEIF({R2 Scheduled Date}, AND(@cell >= Feb2, @cell <= Feb3), {Total Gross}) is returning "$0.00"

Any suggestions?

Answers

  • malorie
    malorie ✭✭
    Options

    Also have tried the following but I am only getting a #UNPARSEALE error in response.

    =AVG(COLLECT({Total Gross}, {R2 Scheduled Date}, AND(IFERROR(MONTH(@cell), 0) = 1, IFERROR(YEAR(@cell), 0) = 2024))))

  • KPH
    KPH ✭✭✭✭✭✭
    Options

    Hi @malorie

    You almost had it with your second formula. Just remove the final parenthesis.

    =AVG(COLLECT({Total Gross}, {R2 Scheduled Date}, AND(IFERROR(MONTH(@cell), 0) = 1, IFERROR(YEAR(@cell), 0) = 2024)))

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!