Trending date formulas across new year
I would like to create a summary formula that automatically updates every week for work completed the previous week.
I have a date column that indicates completion date
I have a helper column that assigns a week number using WEEKNUMBER(date) called "Week Completed"
I have a summary formula as follows:
=COUNTIF([Week Completed]:[Week Completed],(@cell=WEEKNUMBER(TODAY())-1))
Everything worked until this week. Since 52 (the last week of the year) does not equal 1-1 (This week minus 1), I get no results.
Is there another way to right a formula for "last week" or "2 weeks ago" that will survive the new year reset?
Thanks for the help.
Best Answer
-
Hi @AFlint
You can add in an IF statement to check Today's Week. If Today's Week is 1, then instead of -1, we can look for week 52 specifically.
Try this:
=COUNTIF([Week Completed]:[Week Completed], IF(WEEKNUMBER(TODAY()) = 1, 52, (WEEKNUMBER(TODAY()) - 1)))
Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
Answers
-
Hi @AFlint
You can add in an IF statement to check Today's Week. If Today's Week is 1, then instead of -1, we can look for week 52 specifically.
Try this:
=COUNTIF([Week Completed]:[Week Completed], IF(WEEKNUMBER(TODAY()) = 1, 52, (WEEKNUMBER(TODAY()) - 1)))
Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.9K Get Help
- 410 Global Discussions
- 219 Industry Talk
- 457 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 136 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 298 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!