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
- Smartsheet Customer Resources
- 62.9K Get Help
- 379 Global Discussions
- 212 Industry Talk
- 442 Announcements
- 4.6K Ideas & Feature Requests
- 140 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 302 Events
- 33 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!