Need help with multiple nested ANDs
I'm pretty new to smartsheets and can't quite get the syntax right for what I'm trying to get at.
This is what I'm trying to achieve in plain language:
IF YEAR([Due Date]@row) = YEAR(TODAY())
AND(WEEKNUMBER([Due Date]@row) = 52
AND WEEKNUMBER(TODAY()) = 1)
THEN "This Week"
ELSE "Not This Week"
END
Thanks for any help!
Best Answer
-
This is the syntax for what you asked for:
- =IF(AND(YEAR([Due Date]@row)=YEAR(TODAY()), WEEKNUMBER([Due Date]@row) = 52, WEEKNUMBER(TODAY())=1), "This Week", "Not This Week")
It appears to me from your Then and Else that what you may actually be looking for is to see if the Due Date is Due in the current week. If that is the case what you would want is:
- =IF(AND(YEAR([Due Date]@row)=YEAR(TODAY()), WEEKNUMBER([Due Date]@row) = WEEKNUMBER(TODAY())), "This Week", "Not This Week")
Hope this helps!
Best,
Zach Hall
Training Delivery Manager / Charter Communications
Answers
-
This is the syntax for what you asked for:
- =IF(AND(YEAR([Due Date]@row)=YEAR(TODAY()), WEEKNUMBER([Due Date]@row) = 52, WEEKNUMBER(TODAY())=1), "This Week", "Not This Week")
It appears to me from your Then and Else that what you may actually be looking for is to see if the Due Date is Due in the current week. If that is the case what you would want is:
- =IF(AND(YEAR([Due Date]@row)=YEAR(TODAY()), WEEKNUMBER([Due Date]@row) = WEEKNUMBER(TODAY())), "This Week", "Not This Week")
Hope this helps!
Best,
Zach Hall
Training Delivery Manager / Charter Communications
-
@Zachary Hall Thanks! That worked.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 67K Get Help
- 442 Global Discussions
- 154 Industry Talk
- 503 Announcements
- 5.4K Ideas & Feature Requests
- 85 Brandfolder
- 156 Just for fun
- 79 Community Job Board
- 512 Show & Tell
- 34 Member Spotlight
- 2 SmartStories
- 308 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!