The If Function aka If Statement is one of the most popular functions in Excel. It is also one of the most misunderstood functions until it finally clicks in your brain. Today I’m going to share with you my secret for remember how the If Function works.
Here is Excel’s explanation of the If Function: Checks whether a condition is met, and returns on value if TRUE, and another value if FALSE. SYNTAX: IF(logical_test, value_if_true, value_if_false).
If you are not overly technical or scientific, that explanation might confuse you. I know it did me at first.
But you actually use if functions (statements) in one form or another all day long to make decisions and not just in Excel, either.
Let me break it down for you in English, think of the commas as the words “then” and “otherwise”, in that order, like this:
=If(weather=sunny, stay home, go to work)
If the weather is sunny then stay home otherwise go to work.
=If(time>=10:30pm, I’ll go to bed, I’ll stay up)
If the time is greater than or equal to 10:30 then I’ll go to bed otherwise I’ll stay up.
Is it kind of starting to make sense?
Let’s apply it to Excel.
=if(a3>b3, .10, 0) If A3 is greater than B3 then enter .10 otherwise enter 0.
=if(d7>e7, “Bonus”, ‘’”) If D7 is greater than E7 then enter Bonus otherwise leave the cell blank (you would use an open and close quote). All text must go in quotes.
Are you getting the hang of it?
It starts to make sense if you put it into the form of a statement using “then” and “otherwise” for the commas.
See if you can figure out the if functions for these columns below. Hint, they are very similar.
If you’d like the solution, contact me and I’ll send them to you.
I hope you found this helpful and easy to understand. Let me know what you think!
Until the next post, ~live life, not work