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
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 140 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 497 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!