Average IF Formula
I have a column (Completion Date) and a column (Approved Budget).
I am trying to find the Average Approved Budget for 2021.
This formula works for budgets after 2021.
=AVERAGEIF([Completion Date]:[Completion Date], >DATE(2021, 1, 1), [Approved Budget]:[Approved Budget])
But, I cannot figure out how to get the formula to work between 01/01/2021 and 12/31/2021.
This is what I was trying to use:
=AVERAGEIF([Completion Date]:[Completion Date], AND(>DATE(2021, 1, 1), (<DATE(2021, 12, 31))), [Approved Budget]:[Approved Budget])
But I get the #InvalidOperation Error
HELP!!!!!
Best Answers
-
=AVG(COLLECT( [Approved Budget]:[Approved Budget], [Completion Date]:[Completion Date], AND( @cell >= DATE(2021, 1, 1), @cell <= DATE(2021, 12, 31))))
Can you please try this one
...
-
I would probably opt for using an AVG(COLLECT formula instead. Try this:
=AVG(COLLECT([Approved Budget]:[Approved Budget], [Completion Date]:[Completion Date], >DATE(2021, 1, 1), [Completion Date]:[Completion Date], <DATE(2021, 12, 31)))
Hope this helps!:)
Answers
-
=AVG(COLLECT( [Approved Budget]:[Approved Budget], [Completion Date]:[Completion Date], AND( @cell >= DATE(2021, 1, 1), @cell <= DATE(2021, 12, 31))))
Can you please try this one
...
-
I would probably opt for using an AVG(COLLECT formula instead. Try this:
=AVG(COLLECT([Approved Budget]:[Approved Budget], [Completion Date]:[Completion Date], >DATE(2021, 1, 1), [Completion Date]:[Completion Date], <DATE(2021, 12, 31)))
Hope this helps!:)
-
Thanks to both of you these worked!!!!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.1K Get Help
- 351 Global Discussions
- 198 Industry Talk
- 427 Announcements
- 4.4K Ideas & Feature Requests
- 133 Brandfolder
- 127 Just for fun
- 127 Community Job Board
- 455 Show & Tell
- 28 Member Spotlight
- 1 SmartStories
- 283 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!