IF AND calculated field in sharepoint

Dena Hobbs 21 Reputation points
2022-01-13T17:55:23.353+00:00

I need to calculate this and return a yes or no

Column 1 =1
Column 2 if less than $1499
Return yes

Column 1 =2
Column 2 if less than $1960
Return yes

There are a total of 14 possibilities in column 1

This works if just looking a 1 option

=IF(AND([Column 1]<=1,[Column 2]<=1499),”YES”,”NO”,)

The minute you add additional options it quits working.

=IF(AND([Column 1]<=1,[Column 2]<=1499),”YES”,”NO”, IF(AND([Column 1]<=2,[Column 2]<=3999),”YES”,”NO”))

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

Accepted answer
  1. CaseyYang-MSFT 10,461 Reputation points
    2022-01-14T03:04:59.597+00:00

    Hi @Dena Hobbs ,

    IF function syntax: IF(logical_test,value_if_true,value_if_false). If you try to use multiple IF functions, the value_if_false should be replaced by another IF fuction. For Example: =IF(AND([Column 1]=1, [Column 2]<=1499), "Yes", IF(AND([Column 1]=2, [Column 2]<=1960), "Yes", "No")).

    So you could use following formula(Remember to replace number in formula):

    =IF(AND([Column 1]=1, [Column 2]<=1499), "Yes", IF(AND([Column 1]=2, [Column 2]<=1960), "Yes", IF(AND([Column 1]=3, [Column 2]<=2960), "Yes", IF(AND([Column 1]=4, [Column 2]<=3960), "Yes", IF(AND([Column 1]=5, [Column 2]<=4960), "Yes", IF(AND([Column 1]=6, [Column 2]<=5960), "Yes", IF(AND([Column 1]=7, [Column 2]<=6960), "Yes", IF(AND([Column 1]=8, [Column 2]<=7960), "Yes", IF(AND([Column 1]=9, [Column 2]<=8960), "Yes", IF(AND([Column 1]=10, [Column 2]<=9960), "Yes", IF(AND([Column 1]=11, [Column 2]<=10960), "Yes", IF(AND([Column 1]=12, [Column 2]<=11096), "Yes", IF(AND([Column 1]=13, [Column 2]<=12096), "Yes", IF(AND([Column 1]=14, [Column 2]<=13096), "Yes", "No"))))))))))))))  
    

    My test result:

    164919-capture.png


    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.


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.