Photo Credit: goulao
“Alright you little ninny, give me your lunch money!” I heard that a lot growing up… frankly, I got tired of saying it.
Telling people what to do can be an invigorating experience, and as I’ve found over several years of building financial models for commercial real estate analysis, Excel was built to bully. Excel does as it’s told, and never tells on you. So what’s the best way to become an Excel Bully? The IF Statement.
To fully understand the IF statement we must first understand Logic Statements. Logic Statements are declarative sentences that are either true or false, and while the application of Logic Statements within Excel is limitless, the IF statement in Excel is easily garnered by beginner/intermediate level users.
At its core, the IF statement asks if a condition is met, and returns one value if the condition is met, and another value if the condition is not.
Syntax: =IF(is this true?, if true do this, if false do this)
(Edit: relevant example tangent) I’ve known a handful of people who don’t need sleep, averaging anywhere from 3-5 hours a night. If I were subject to that little sleep, God forbid, don’t even look at me the next day or heads might roll.
The tangent above could be summarized into a simple logic statement: If I get more than 6 hours of sleep, I’m happy, if not, don’t talk to me!
If we were to translate that into Excel speak, it would read:
=IF(hours of sleep > 6, “I’m happy”, “Don’t talk to me!”)
We’ve just told Excel to check the number of hours I slept data and forced Excel to give us a response based on the criteria.
So here’s to Bullies! Welcome to the top of the world, where Excel does just as you ask.