# Average Collect - Find Overall Class Rating in a Date Range

Options
✭✭

Hi Smartsheet Community!

I'm looking to average an overall class rating for classes that took place from January 1, 2023, to January 31, 2023. Below is the calculation I have so far, but I keep getting incorrect argument set.

Any ideas would be greatly appreciated. Thank you :)

=AVG(COLLECT({Class from Feedback Sheet}, HAS(@cell, [Column 2]@row), {Rate Class Overall}, {Date Attended Class}, AND(@cell >= DATE(2023, 1, 1), @cell <= DATE(2023, 1, 31))))

## Best Answer

• ✭✭✭✭✭✭
Answer ✓
Options

Looks like your syntax is off. The range to average should be the first range followed by your range/criteria sets.

=AVG(COLLECT({Rate Class Overall}, {Class from Feedback Sheet}, HAS(@cell, [Column 2]@row), {Date Attended Class}, AND(@cell >= DATE(2023, 1, 1), @cell <= DATE(2023, 1, 31))))

## Answers

• ✭✭✭✭✭✭
Answer ✓
Options

Looks like your syntax is off. The range to average should be the first range followed by your range/criteria sets.

=AVG(COLLECT({Rate Class Overall}, {Class from Feedback Sheet}, HAS(@cell, [Column 2]@row), {Date Attended Class}, AND(@cell >= DATE(2023, 1, 1), @cell <= DATE(2023, 1, 31))))

• ✭✭
Options

Thank you, @Paul Newcome! Worked like a charm!

• ✭✭✭✭✭✭
Options

Happy to help. 👍️

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!