# Formula help: Count how many dates are from the last week and the coming week

Options

I am trying to do an equation in sheet summary that will calculate how many dates were in the last 7 days and are scheduled in the next 7 days.

This is what I have, I've tried others on community questions that were close and figured I would just ask.

=COUNTIFS([Start Date]:[Start Date], @cell <= TODAY(-1), @cell > TODAY(-7))

Tags:

• ✭✭✭✭✭✭
edited 06/17/24 Answer ✓
Options

=COUNTIFS([Start Date]:[Start Date],AND(@cell <TODAY(), @cell >= TODAY(-7))) is the last 7 and

=COUNTIFS([Start Date]:[Start Date], AND(@cell >TODAY(), @cell <= TODAY(+7))) are the next 7

if your wanting to add them together.

=COUNTIFS([Start Date]:[Start Date],AND(@cell <TODAY(), @cell >= TODAY(-7)))+COUNTIFS([Start Date]:[Start Date], AND(@cell >TODAY(), @cell <= TODAY(+7)))

If you found this comment helpful. Please respond with any of the buttons below. Awesome🖤, Insightful💡, Upvote⬆️, or accepted answer. Not only will this help others searching for the same answer, but help me as well. Thank you.

• ✭✭✭✭✭✭
edited 06/17/24 Answer ✓
Options

=COUNTIFS([Start Date]:[Start Date],AND(@cell <TODAY(), @cell >= TODAY(-7))) is the last 7 and

=COUNTIFS([Start Date]:[Start Date], AND(@cell >TODAY(), @cell <= TODAY(+7))) are the next 7

if your wanting to add them together.

=COUNTIFS([Start Date]:[Start Date],AND(@cell <TODAY(), @cell >= TODAY(-7)))+COUNTIFS([Start Date]:[Start Date], AND(@cell >TODAY(), @cell <= TODAY(+7)))

If you found this comment helpful. Please respond with any of the buttons below. Awesome🖤, Insightful💡, Upvote⬆️, or accepted answer. Not only will this help others searching for the same answer, but help me as well. Thank you.

• Options

Perfect! Thank you :)

• ✭✭✭✭✭✭
Options

You can also combine them in a single COUNTIFS:

=COUNTIFS([Start Date]:[Start Date],AND(@cell <= TODAY(7), @cell >= TODAY(-7)))

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!