# Need help with multiple nested ANDs

Options
✭✭

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!

Tags:

• ✭✭✭✭✭✭
Options

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

• ✭✭✭✭✭✭
Options

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

• ✭✭
Options

@Zachary Hall Thanks! That worked.

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!