Sharepoint - Calculated Column using IF OR AND

Lincoln Raad 21 Reputation points
2022-01-20T16:29:27.637+00:00

Hi guys, I need some help with the syntax to create a calculated column in SharePoint.

Considering columns A, B, C and D, I need to calculate a new column with the following logic:

if A="aaa" and (B="bbb" or C="ccc" or D="ddd") then

New Column=X

if not

New Column=Y

Example:

A="aaa"
B="bbb"
then
Result X

A="aaa"
C="ccc"
then
Result X

A="ttt"
C="ccc"
then
Result Y

A="aaa"
B is not "bbb"
C is not "ccc"
D is not "ddd"
then
Result Y

Thank you very much

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

Accepted answer
  1. Allen Xu_MSFT 13,866 Reputation points
    2022-01-21T05:39:45.443+00:00

    Hi @Lincoln Raad ,

    Use this formula in your calculated column:

    =IF(AND(A="aaa", OR(B="bbb", C="ccc", D="ddd")), "X", "Y")  
    

    ----------

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.