# 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

• ✭✭✭✭✭✭

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:[email protected] | 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'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:[email protected] | 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⬆️"

• ✭✭

Thank you Kaveri

Thank you Andrée

I will try all options.

Have a great weekend!

Tali

• ✭✭✭✭✭✭

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:[email protected] | 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

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!