# IF(AND(OR Statement Help

Options
✭✭

I want to write a statement to determine if a record was extended on time?

I have a calculated column that determines if a record extension is required [Extension Required] , and the responses are Yes or No.

I also have columns for the record [Due Date], and the [Extension Approval Date]

Logic: If the value in the [Extension Required] column is Yes, AND either the [Extension Approval Date] is greater than the [Due Date], OR [Extension Approval Date] is "N/A", THEN the record was not extended on time.

I tried the following statement, but it returned: #UNPARSEABLE

=IF(AND(OR([Extension Required]@row=Yes, ([Extension Approval Date]@row < [Due Date]@row) [Extension Approval Date]@row ="N/A"), "No", "Yes"))

• ✭✭✭✭✭✭
Options

Hi Doris, Try this one:

=IF(AND([Extension Required]@row = Yes, OR([Extension Approval Date]@row > [Due Date]@row,[Extension Approval Date]@row ="N/A")), "No", "Yes"

It's all in how you nest the OR statement. It has to be within the AND statement to make either of the OR and the Extension required row = yes calculate together. Let me know if it worked!

• ✭✭
Options

Hi @Mike Wilday,

Thank you for responding. I posted the formula as shown below,

=IF(AND([Extension Required]@row = Yes, OR([Extension Approval Date]@row > [Due Date]@row,[Extension Approval Date]@row ="N/A")), "No", "Yes")

and it still returned #UNPARSEABLE.

I checked all the column names and no errors there. Any other thoughts? THANK YOU!!!

• ✭✭✭✭✭✭
Options

Hi @Doris F ,

Try putting quotation marks around your first Yes (in the AND statment). That should help!

Best,

Heather

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!