How To Increase The Arguments Of The "if" Function In Excel

Table of contents:

How To Increase The Arguments Of The "if" Function In Excel
How To Increase The Arguments Of The "if" Function In Excel

Video: How To Increase The Arguments Of The "if" Function In Excel

Video: How To Increase The Arguments Of The
Video: Excel IF Formula: Simple to Advanced (multiple criteria, nested IF, AND, OR functions) 2024, May
Anonim

The purpose of the logical function "if" in the spreadsheet editor Microsoft Office Excel is to check the truth of the expression passed to it. Depending on the result of this check, the function returns one of the two values passed to it for this. Each of the three parameters - the condition and the two returned results - can also be comparison functions, allowing any number of arguments to be compared.

How to increase function arguments
How to increase function arguments

Necessary

Basic Excel functions skills

Instructions

Step 1

Use the boolean and operator to increase the number of arguments compared using the if function. It will allow you to use more comparison operations in cases where the truth of all the comparison operations listed in the arguments is necessary. For example, if this function should return one, provided that the value in cell A1 is greater than the value in cell A5, and the value of B1 is the same as the value of B3, then the “if” function can be written like this: IF (AND (A1> A5; B1 = B3); 1; 2). The number of arguments to the “and” function cannot exceed 30, but each of them itself can contain the “and” function, so you have the opportunity to compose a nesting doll from functions of any reasonable nesting level.

Step 2

Sometimes, instead of a necessary condition, it is necessary to check a sufficient condition. In such cases, instead of the "and" function, expand the number of arguments using the "or" function. Let's say you want the if function to return one when either the value in cell A1 is greater than the value in cell A5, or B1 is the same as B3, or A4 is a negative number. If none of the conditions are met, then the function should return zero. Such a construction of three compared and two returned arguments of the "if" function can be written like this: IF (OR (A1> A5; B1 = B3; A4

Step 3

Combine the “and”, “or” and “if” functions at different nesting levels to obtain the optimal algorithm for comparing the required number of arguments. For example: IF (OR (A1> A5; IF (AND (A7> A5; B1

Step 4

Use the second and third if arguments (return values) to increase the number of parameters to compare. Each of them can contain seven levels of nesting with “and”, “or” and “if” functions. At the same time, do not forget that the comparison operations you put in the second argument will be checked only if the comparison operation in the first “if” argument returns the value “true”. Otherwise, the functions written to the position of the third argument will be checked.

Recommended: