IF function in detail
To put it simply, IF provides one of two values, depending on what some condition is true or false. IF has three arguments / options that have to be defined. It´s like:
- =IF(first argument, second argument, third argument)
- =IF(A1>1,"The number in A1 is larger than 1","The number is not larger than 1")
- The first argument is a condition. When defining it i can ask myself a question "How could I recognize that the second argument (not the third one) should be provided?". So it could be something like like "A1>1", since the value in A1 decides about the result.
- The second argument is the value that should be shown when the condition is met.
- The third argument is the value that should be shown in any other case.
- The quotation marks in first argument are used when working with text. For example A1=1, but A1="January"
- The quotation marks in second and third arguments are used when some text should be provided. For example 1, but "January".
- IF function is frequently nested in other IF function or another function, which could be very useful.
- IF you have many options to decide, consider use of VLOOKUP.