sharepoint nested if and statement syntax help

Copper Contributor

Hello,

 

I have a nested IF AND statement, but i think i may be wrong with the brackets.

Can i ask that someone casts their eye over please.

I am not sure if i need closing brackets in each condition.

 

Thank you for your time

 

=IF(AND([Payment Method]="PPT - Partial",[Copy Docs emailed for approval]<=[Despatch Target.],"On Time", IF(AND([Payment Method]="OAC",[Despatch Date of Original Docs]<=[Despatch Target.],"On Time", IF(AND([Payment Method]="DOC",[Despatch Date of Original Docs]<=[Despatch Target.],"On Time",IF(AND([Payment Method]="LOC",[Despatch Date of Original Docs]<=[Despatch Target.],"On Time","Late")))))

3 Replies
Can anyone confirm if this is the correct way to do IF AND in a SharePoint calculated column?
Thank you

@DairyG1 You were missing some closing brackets. Here's the corrected formula:

 

=IF(AND([Payment Method] = "PPT - Partial", [Copy Docs emailed for approval] <= [Despatch Target.]), "On Time", IF(AND([Payment Method] = "OAC", [Despatch Date of Original Docs] <= [Despatch Target.]), "On Time", IF(AND([Payment Method] = "DOC", [Despatch Date of Original Docs] <= [Despatch Target.]), "On Time", IF(AND([Payment Method] = "LOC", [Despatch Date of Original Docs] <= [Despatch Target.]), "On Time", "Late"))))

 


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

Yes i managed to get it working this morning, just didn't get a chance to update the thread.

Thank you @ganeshsanap for taking the time to answer, given there has been over 100 views.
Much appreciated.