Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Nested conditional statements
gcotterl wrote...
I've having difficulty following what parts of a formula are triggered if the result of each IF statement is "true" or "false". .... Excel evaluates formulas left to right, so the first condition satisfied produces the result. For example, if cell X99 evaluates to 2.25, the formula =IF(X99<=0, "black", IF(X99<=1, IF(X99<=0.5, "gray", "white" ), IF(X99<=2, IF(X99<=1.5, "pink", "red" ), IF(X99<=3, IF(X99<=2.5, "purple", "blue" ),... The first 3 IF conditions aren't satisfied, but the 4th is (X99<=3). The 5th condition is also satisfied (X99<=2.5), so the return value is "purple". Had X99 evaluated to 2.8, the 4th condition would still have been satisfied, but the 5th wouldn't have been, so the return value would have been "blue". Even if further out in the formula there were a condition X99=2.25, it wouldn't determine the return value because the pair of conditions X99<=3 and X99<=2.5 were satisfied first. See if your Tools menu contains the command Tools Formula Auditing Evaluate Formula. If it does, it'll step through how Excel evaluates your formulas. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Nested conditional statements | Excel Worksheet Functions | |||
Nested IF statements | Excel Worksheet Functions | |||
Help with nested if/or statements | Excel Discussion (Misc queries) | |||
I want to use more than 7 nested if then statements | Excel Worksheet Functions | |||
Nested IF statements | Excel Worksheet Functions |