Writing IF Statements in Excel

The IF Statement in Excel is a good tool, but is quite often little understood by Excel users.  The IF statement tests a value and then says whether it is true or false and then completes an action set by the user.  An example could be, is the number in Cell A1 bigger than the number in Cell B1?

The IF statement has three parts, first is the test of the item (as above, is the number in A1 larger than the number in B1?), second is what value do you want if the answer is true (you could display “yes”), and finally what value do you want if the answer is false (you could display “no”).

Writing an IF Statement

image1So, lets write an IF statement for the first row as per the picture.  In the formula you need seperate each part (or argument) by a comma.  So clicking into cell C2 we would write:


Then click enter.  Cell C2 should display “No” because the answer is false.  If we remove the cell references and use the values it becomes easier to understand.  So the above formula would now read:

IF(10 is greater than 4, then display “Yes”, If 10 is not greater than 4 then display “No”).  Whenever you want text displayed as your value for either true or false you must enter between quotes.  But if you want to display numbers then quotes are not required.  For example, =IF(A1>B1,1,2).  You can have almost anything as your value for either true or false.  But what if you don’t wish to display anything for one of the values, lets say the false value.  Well you simply use two quotes with nothing in between, like so:


The downside with IF statements is that you cannot test a third item, unless that is you nest the IF statements into one formula.  You can then test multiple criteria, with nested IF statements, but in one long formula.

2,465 thoughts on “Writing IF Statements in Excel

  1. harga-jual.com

    An outstanding share! I have just forwarded this onto a friend who has been doing a little research on this. And he actually bought me breakfast because I stumbled upon it for him… lol. So allow me to reword this…. Thank YOU for the meal!! But yeah, thanx for spending the time to discuss this issue here on your web page.

  2. iamgutsclub.com

    Can I simply say what a relief to uncover an individual who truly knows what they’re talking about on the internet. You certainly understand how to bring a problem to light and make it important. More and more people need to look at this and understand this side of the story. It’s surprising you’re not more popular since you surely possess the gift.

  3. Assinar Smart Iptv

    Ponto IPTV a melhor programacao de canais IPTV do Brasil, filmes, series, futebol, lutas, shows, documentarios em alta definicao de imagem e som em SD, HD, FULL HD, 4K. compativel com todos aparelhos do mercado Brasileiro.

  4. udfauzi

    Your style is very unique compared to other people I have read stuff from. Thanks for posting when you’ve got the opportunity, Guess I will just bookmark this page.

  5. acompanhantes em campinas

    I’m not sure why but this website is loading very slow for me.
    Is anyone else having this problem or is it a problem on my
    end? I’ll check back later on and see if the problem still exists.

  6. Armodafinil Buy

    I love your blog.. very nice colors & theme. Did you create this website yourself or
    did you hire someone to do it for you? Plz reply as I’m looking
    to construct my own blog and would like to find out where u got this from.

    appreciate it

  7. vivoslot

    Oh my goodness! Impressive article dude! Thank you, However I am going through issues with your RSS. I don’t know why I am unable to subscribe to it. Is there anybody else having similar RSS problems? Anyone that knows the solution can you kindly respond? Thanx!!

Comments are closed.