IF Statements In Excel... And Other Cool Tricks 5623

IF Statements In Excel... And Other Cool Tricks

Published

IF you've ever wished Excel would do a little more for you, this may be what you're looking for.

“IF” Statements in Excel
And other cool tricks.
Ever wish you could only grab SOME of the data? IF statements work like this:

=if(cell to look in=condition you’re looking for, return this, if it doesn’t have that item return this)27db10ae30094dc32d8eda65172bf96b-huge-ba

In practice, let’s say we have a super simple excel sheet that has only one column, full of types of fruits. You want to count instances of the word “banana”. Your if statement might look like this:

=if(A1 = “banana”, 1, 0) (hey did you notice I put quotes around that string?)**


Fill this formula down. You’ll get a 1 in the column each time “banana” appears, and a 0 every time it’s some other fruit, making for easy counting. I’ll leave it to you to figure out how else you can use this tool! (Hint, you can return strings, and nest more functions into your “IF” statement.)

Some ways to capitalize on your new “IF” function (using Exceljet!):
  1. ISNUMBER(SEARCH)
    1. For if you want to count instances of “banana” but you aren’t sure where it might occur in the cell, like if you have a survey of board members listing which snacks they want to see at the next meeting.
  2. IF(AND)
    1. For when you need MORE if statements.
  3. LEFT, RIGHT, and CENTER
    1. Slice some strings into pieces! Sometimes you just need the leftmost four characters, or the center two, or the right one.
  4. &
    1. Connect things!
Go forth and Excel to your heart’s content!
PS—for the advanced, try your hand at indexing with MATCH and INDEX.
PPS—author’s favorite Excel function, the modest PROPER.

ae9a744df1488c8f4a90089482550311-huge-ex**Important items to note:
Excel is for numbers, but a lot of the time we’re using it for words. Excel calls words “strings” like a “string” of characters,
and it needs you to tell it when you’re looking for a “string”. Any time you’re working with strings (words), be sure to put quotes around it (like this: “banana”) or you’ll get errors.


If this function still gives you trouble, make sure your number format is in “general”. If you don't know what a number format is check out this guide.
News Tips, Tricks, and Timesavers! 04/29/2019 5:34pm EDT

Leave a Comment

6 Comments
I also like If statements in my gift acknowledgement letters rather than having numerous letter templates.
Great information! 
I use the COUNTIF function a lot.  Thanks for the other tips.
There is no feeling like the feeling of writing a really complex nested =if statement that isn't pulling right, and then you finally -FINALLY- figure out where the mistake is and perfection is achieved.
Image result for wand chooses the wizard gif
Daniel Snyder‍ Yep, love a good VLOOKUP!
Dan Snyder Dan Snyder Apr '19
VLOOKUP is also a great function and Exceljet is a great resource.

Share: