#197: Excel’s IF Function

Probably one of the first Excel functions many people learn, beyond the basic math stuff is the IF function. It certainly is one that I use a lot and find very useful. If you already use the IF function you might be interested in this cool spin on using it with AND, OR & NOT situations and you are now excused.

If you’re still with me, the IF function is one of Excel’s most useful and most used functions. The IF function is simply a test to see whether a certain condition is true or false. Based on the result it will return one value if a condition you specify is TRUE and another if it is FALSE.

How It Works:

Here is what the syntax look:

=IF(condition,true_result,false_result)

For example, we could use an IF statement to automatically indicate if each category is under or over budget.

So in cell D2 we would enter…

=IF(B2>C2,”Under Budget”,”Over Budget”)

..which in plain English translates to “If the budgeted amount is greater than the actual amount display “Under Budget”. If not, display “Over Budget”. By copying this down column D we get this result.

Download a copy of this example to play with.

Simple yet powerful. Do you use IF statements in your spreadsheets? What is your favorite? Let me know, I’d love to hear from you.

Advertisements

2 thoughts on “#197: Excel’s IF Function

  1. I often make spreadsheets to track data over time, even for something as simple as my own weight. I don’t like to see “n/a” in rows where there isn’t any data yet, and so I use an IF statement like this:

    =(IF(B7>0,$B$4-B7,””))

    If there’s a weight entered in B7, subtract that weight from the starting point and show the result; otherwise, “” means “don’t show anything.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s