Calculate multiple or range in formula
Hello,
I have created a sheet that reflect Projects end year and I'd like to count certain years.
I have the following formula:
=COUNTIF([Year Closed]:[Year Closed], "2023") that works well.
How do I calculate multiple years like 2022 & 2023, or a range 2020-2023 in one formula?
Thanks!
Tali
Best Answer
-
Excellent!
Happy to help!
✅Please support the Community by marking the post(s) that helped or answered your question or solved your problem with the accepted answer/helpful, Insightful/Vote Up/Awesome. It will make it easier for others to find a solution or help to answer!
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
Answers
-
Hi @TaliRXM
I hope you're well and safe!
Try something like this.
=COUNTIF([Year Closed]:[Year Closed], 2023) + COUNTIF([Year Closed]:[Year Closed], 2022)
Here are two options for the second part.
=COUNTIFS([Year Closed]:[Year Closed], >=2020, [Year Closed]:[Year Closed], <=2023)
=COUNTIFS([Year Closed]:[Year Closed], AND(@cell >= 2020, @cell <= 2023))
Did that work/help?
I hope that helps!
Be safe, and have a fantastic weekend!
Best,
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
✅Did my post(s) help or answer your question or solve your problem? Please support the Community by marking it Insightful/Vote Up, Awesome, or/and as the accepted answer. It will make it easier for others to find a solution or help to answer!
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
-
Hi TaliRXM
I hope you are doing well,
Please try this formula - =IF([Year closed]@row = "2023", COUNTIF([Year closed]:[Year closed], "2023"), IF([Year closed]@row = "2022", COUNTIF([Year closed]:[Year closed], "2022"), IF([Year closed]@row = "2021", COUNTIF([Year closed]:[Year closed], "2021"), IF([Year closed]@row = "2020", COUNTIF([Year closed]:[Year closed], "2020"), ""))))
I hope this is useful to you, please let me know if any changes are required.
Have a Good Day.
Thanks,
Kaveri Vipat
Senior Associate - Smartsheet Development, Ignatiuz Software
2023 Core Product Certified
Did this answer help you? Show some love by marking this answer as "Insightful💡" or "Awesome❤️" and "Vote Up⬆️"
-
-
Excellent!
Happy to help!
✅Please support the Community by marking the post(s) that helped or answered your question or solved your problem with the accepted answer/helpful, Insightful/Vote Up/Awesome. It will make it easier for others to find a solution or help to answer!
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.1K Get Help
- 444 Global Discussions
- 142 Industry Talk
- 472 Announcements
- 5K Ideas & Feature Requests
- 83 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 489 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 301 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!