Then the inner IF block returns the text "Normal Room Temperature". If the value at B2 is greater than or equal to 20 and less than or equal to 25. Inside the inner IF block, the value at B2 is checked. However, if the value at B2 is greater than or equal to 20, then the inner IF block is evaluated. The formula translates to – if the value at B2 is less than 20, then the text "Below Room Temperature" is returned from the outer IF block. = IF(B2 =20,B2 <=25)," Normal Room Temperature", " Above Room Temperature")) If we are able to find the 'Blue' color, then in the adjacent cell, we need to assign a 'Yes' otherwise, assign a 'No'. In this example, we have a list of colors, and we aim to find the 'Blue' color. Now, let's try to see a simple example of the Excel IF function: Example 1: Using 'equal to' comparison operator within the IF function
Now, let's see some simple examples to use these comparison operators within the IF Function: Simple Examples of Excel IF Statement For example – ISBLANK, ISERROR, ISEVEN, ISODD, etc Apart from these, you can also use any other function that returns a boolean result (either 'true' or 'false').Nesting of IF statement means using one if statement within another.Ĭomparison Operators That Can Be Used With IF Statementsįollowing comparison operators can be used within the 'logic_test' argument of the IF function: Nesting of IF statements is possible, but Excel only allows this to 64 levels.IF function throws a '#Name?' error if the 'logic_test' or boolean expression you are trying to evaluate is invalid.Both values cannot be returned at the same time.