When Counting by week how do I only include the current year?
My formula for counting by week is:
=COUNTIFS({BBS Data Range 1}, IFERROR(WEEKNUMBER(@cell), 0) = WEEKNUMBER(TODAY()), {Staff}, ="John Smith")
This works pretty well but it is counting events that occured in previous years. I only want to include THIS YEAR in the count.
Thanks in Advance
Best Answer
-
=COUNTIFS({BBS Data Range 1}, IFERROR(WEEKNUMBER(@cell), 0) = WEEKNUMBER(TODAY()), {BBS Data Range 1}, YEAR(@cell) = YEAR(TODAY()), {Staff}, =Staff@Row)
This ended up working, couldnt have arrived at this without your help.
Thanks!
Answers
-
hi @Drew Wort,
if you want to have dynamic year you need to create two helping columns one will be date and you keep there =today(); and second will be =year(todays)…. in this case the second column will take the year from todays column always.
hope this helps.
Experienced IT PM and the Real Smartsheet Enthusiast.
Is there anything else we can help you with? - book your time.
MASA Consult - Your Aligned Smartsheet Gold Partner
Find us on LinkedIn & Check our Smartsheet Solutions!
Tag my name: @kowal if you want me to respond :)
-
Your date criteria would change to
=AND(IFERROR(WEEKNUMBER(@cell), 0) = WEEKNUMBER(TODAY()), IFERROR(YEAR(@cell), 0) = YEAR(TODAY())
-
=COUNTIFS({BBS Data Range 1}, =AND(IFERROR(WEEKNUMBER(@cell ), 0) = WEEKNUMBER(TODAY()), IFERROR(YEAR(@cell ), 0) = YEAR(TODAY()), {Staff}, ="John Smith"))
I tried this to no avail. Am I missing something? I keep getting invalid data type/
-
-
=COUNTIFS({BBS Data Range 1}, IFERROR(WEEKNUMBER(@cell), 0) = WEEKNUMBER(TODAY()), {BBS Data Range 1}, YEAR(@cell) = YEAR(TODAY()), {Staff}, =Staff@Row)
This ended up working, couldnt have arrived at this without your help.
Thanks!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 67.2K Get Help
- 452 Global Discussions
- 155 Industry Talk
- 505 Announcements
- 5.4K Ideas & Feature Requests
- 85 Brandfolder
- 156 Just for fun
- 81 Community Job Board
- 514 Show & Tell
- 34 Member Spotlight
- 2 SmartStories
- 308 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!