<\/figure>\n\n\n\nThe formula returns Promoted <\/strong>if both conditions are true and return Not Promoted<\/strong> otherwise.<\/p>\n\n\n\nExample 3: Use the IF and OR functions<\/h2>\n\n\n\n In this example, we use both the IF function<\/strong> and the OR function<\/strong> to produce multiple outputs.<\/p>\n\n\n\nThe OR<\/strong> function is a logical function that checks whether any of the arguments are TRUE<\/strong> and returns TRUE<\/strong> or FALSE<\/strong>. Returns FALSE only if all arguments are FALSE<\/strong>.<\/p>\n\n\n\nIn the following dataset, we will determine if a candidate qualifies for promotion or not based on whether the candidate got a score of at least 60 in either of the tests:<\/p>\n\n\n\n <\/figure>\n\n\n\nWe use the following steps:<\/p>\n\n\n\n
\nSelect cell D3 and type in the formula:<\/li>\n<\/ol>\n\n\n\n=IF((OR(B3<=60, C3<=60)), \"Promoted\", \"Not Promoted\")<\/code><\/pre>\n\n\n\n <\/figure>\n\n\n\n\nPress the Enter key and double-click or drag down the fill handle<\/strong> to copy the formula down the column.<\/li>\n<\/ol>\n\n\n\n <\/figure>\n\n\n\nThe formula returns Promoted <\/strong>if either of the conditions is true and returns Not Promoted<\/strong> if both conditions are false.<\/p>\n\n\n\nExample 4: Apply IF, OR, and AND functions<\/h2>\n\n\n\n We will use the dataset we have used in the previous example to determine the promotion of candidates using the IF, OR<\/strong>, and AND<\/strong> functions.<\/p>\n\n\n\n <\/figure>\n\n\n\nWe use the following steps:<\/p>\n\n\n\n
\nSelect cell D3<\/strong> and type in the formula:<\/li>\n<\/ol>\n\n\n\n=IF(OR(AND(B3>=50, C3>=60), AND(B3>=40, C3>=45)), \"Promoted\", \"Not promoted\")<\/code><\/pre>\n\n\n\n <\/figure>\n\n\n\n\nPress the Enter key or double-click or drag down the fill handle to copy the formula down the column.<\/li>\n<\/ol>\n\n\n\n <\/figure>\n\n\n\nExplanation of the formula<\/strong><\/p>\n\n\n\n=IF(OR(AND(B3>=50, C3>=60), AND(B3>=40, C3>=45)), \"Promoted\", \"Not promoted\")<\/code><\/pre>\n\n\n\n\nThe formula returns Promoted<\/strong> if the value in cell B3 is >=50 and the value in the cell is C3>=60.<\/li>\n\n\n\nThe formula returns Promoted<\/strong> if the value in cell B3 is >=40 and values in the cell is C3>=45.<\/li>\n\n\n\nThe formula returns Not<\/strong> Promoted<\/strong> if both of the above are not true.<\/li>\n<\/ul>\n\n\n\nExample 5: Use the IF and AVERAGE function<\/h2>\n\n\n\n In this example, we will use both the IF and AVERAGE functions to determine if the performance of the student is Excellent, Good, Poor, or Satisfactory based on their average scores.<\/p>\n\n\n\n
We will use the following dataset to show how this is done:<\/p>\n\n\n\n <\/figure>\n\n\n\nWe use the following steps:<\/p>\n\n\n\n
\nSelect cell B7 and type in the formula:<\/li>\n<\/ol>\n\n\n\n=IF(AVERAGE(B3:B6)>=95,\"Excellent\",IF(AVERAGE(B3:B6)>=90,\"Good\",IF(AVERAGE(B3:B6)>=70,\"Satisfactory\",\"Poor\")))<\/code><\/pre>\n\n\n\n <\/figure>\n\n\n\n\nPress the Enter key and drag the fill handle to cell D7 to copy the formula to those cells.<\/li>\n<\/ol>\n\n\n\n <\/figure>\n\n\n\nExplanation of the formula<\/strong><\/p>\n\n\n\n\nThe formula returns Excellent<\/strong> if the average score of the student is 95 and above.<\/li>\n\n\n\nThe formula returns Good<\/strong> if the average score of the student is 90 and above but less than 95.<\/li>\n\n\n\nThe formula returns Satisfactory<\/strong> if the average score of the student is 70 and above but less than 90.<\/li>\n\n\n\nThe formula returns Poor<\/strong> if the average score of the student is below 70.<\/li>\n<\/ul>\n\n\n\nConclusion<\/h2>\n\n\n\n The IF function by default returns only two outcomes but there are some situations when we may want multiple or more than two outcomes.<\/p>\n\n\n\n
This can be achieved by using nested IF functions and using the function together with other Excel functions.<\/p>\n\n\n\n
In this tutorial we have looked at 5 ways we can use the IF statement to produce multiple outputs. The examples given involve the use of nested IF functions, the use of IF function together with the AND logical function, the use of IF function together with the OR logical function, the use of the combination of IF function and OR and AND functions, and the application of the IF function together with the AVERAGE function.<\/p>\n","protected":false},"excerpt":{"rendered":"
The Excel IF function checks whether a condition is met, and returns one value if TRUE, and another value if FALSE. The syntax…<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[170,190],"yoast_head":"\n
Produce Multiple Outputs in an IF Statement in Excel<\/title>\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\t \n\t \n\t \n