Hi all,
I am reviewing a workbook made by someone else and I have come across a formula syntax that I've not seen before. I'm hoping someone can explain to me what it is doing and if it is ok or not.
I use IF statements all the time and am familiar with their structure =IF(logical_test, [value_if_true], [value_if_false]). I am also familiar with nesting multiple IF statements, but I have only ever nested additional IF statements in the "value if false" argument.
Question: Is there ever a reason to nest IF statements in the "value if true" argument? How does Excel read that - like an AND, or like an OR? Excel isn't rejecting the formula and it is generating the intended result, but I don't understand why.
Specifics: The formula I am looking at checks to see that two cells (E5 and F5) are retrieving data and then returns either their sum or a message to "Enter All Information"
=IF(E5="Enter All Information", IF(F5="Enter All Information", "Enter All Information"), SUM(E5:F5))
Had I written the formula, I would have used =IF(OR(E5="Enter All Information", F5="Enter All Information"), "Enter All Information", SUM(E5:F5)). E5 and F5 will either have a number or show "Enter All Information" - no other value.
Thank you for your help!
E
I am reviewing a workbook made by someone else and I have come across a formula syntax that I've not seen before. I'm hoping someone can explain to me what it is doing and if it is ok or not.
I use IF statements all the time and am familiar with their structure =IF(logical_test, [value_if_true], [value_if_false]). I am also familiar with nesting multiple IF statements, but I have only ever nested additional IF statements in the "value if false" argument.
Question: Is there ever a reason to nest IF statements in the "value if true" argument? How does Excel read that - like an AND, or like an OR? Excel isn't rejecting the formula and it is generating the intended result, but I don't understand why.
Specifics: The formula I am looking at checks to see that two cells (E5 and F5) are retrieving data and then returns either their sum or a message to "Enter All Information"
=IF(E5="Enter All Information", IF(F5="Enter All Information", "Enter All Information"), SUM(E5:F5))
Had I written the formula, I would have used =IF(OR(E5="Enter All Information", F5="Enter All Information"), "Enter All Information", SUM(E5:F5)). E5 and F5 will either have a number or show "Enter All Information" - no other value.
Thank you for your help!
E