SharePoint List- Calculated column for "IF(AND" statement not returning correct value

Harry N Nomikos 1,336 Reputation points
2023-06-15T07:11:03.8333333+00:00

Hi Team,

I've created a calculated column that returns 6 separate value and for some reason it's not returning the correct value when an item;

Is this part of a Remediation Project]="Yes",[Type of WFP Request]="Mailout/Marketing Campaign" =Remediation Event. Instead it's returning "Mailout/Marketing Campaign"

I've provided the formula I've used for my calculated column and highlighted in bold where it should return the word value "Remediation Event"

=IF([Type of WFP Request]="Awareness Only/FYI","Awareness Only/FYI",IF([Type of WFP Request]="Mailout/Marketing Campaign","Mailout/Marketing Campaign",IF(AND([Is this part of a Remediation Project]="Yes",[Type of WFP Request]="Mailout/Marketing Campaign"),"Remediation Event",IF(AND([Type of WFP Request]="Off-Phone Training",[Type of Training]="Organisation e-learn"),"Organisation e-learn Training",IF(AND([Type of WFP Request]="Off-Phone Training",[Type of Training]="Remediation Briefing"),"Remediation Training & Mailout",IF(AND([Type of WFP Request]="Off-Phone Training",[Type of Training]="Mailout/Marketing Briefing"),"Mailout/Marketing Training & Marketing Mailout",""))))))

The below screenshot shows the two conditions have been met, yet the value is not correct

User's image

Any help would be greatly appreciated.

Cheers,
Harry

Microsoft 365 and Office SharePoint Server For business
Microsoft 365 and Office SharePoint For business Windows
{count} votes

Accepted answer
  1. Zehui Yao_MSFT 5,876 Reputation points
    2023-06-21T02:30:34.44+00:00

    Hi @Harry N Nomikos,

    Here is the formula I tested in my environment and can achieve the results you expect, please try if it meets your needs.

    =IF([Type of WFP Request]="Awareness Only/FYI","Awareness Only/FYI",IF(AND([Is this part of a Remediation Project]="Yes",[Type of WFP Request]="Mailout/Marketing Campaign"),"Remediation Event",IF([Type of WFP Request]="Mailout/Marketing Campaign","Mailout/Marketing Campaign",IF(AND([Type of WFP Request]="Off Phone Training",[Type of Training]="Organisational e-learn"),"Organisational e-learn Training",IF(AND([Type of WFP Request]="Off Phone Training",[Type of Training]="Remediation Briefing"),"Remediation Training & Mailout",IF(AND([Type of WFP Request]="Off Phone Training",[Type of Training]="Mailout/Marketing Briefing"),"Mailout/Marketing Training & Marketing Mailout",""))))))

    MicrosoftTeams-image


    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 comments No comments

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.