IF function

This function allows you to test a logical statement and return one value if it’s true and another value if the statement is false.




IF(Expression, Value if true, Value if false)


  • Expression (required) – This is the expression you want to test.
  • Value if true (required) – This is the result the function will return if the expression is true.
  • Value if false (optional) – This is the result the function will return if the expression is false. If nothing is entered here the function will return FALSE when the expression is false.




In this example we use the formula IF(A2=”Donald Trump”,”Lame”,”Not Lame”). If the value in A2 is “Donald Trump” then the result is “Lame”, if it’s any other value the result is “Not Lame”.


IF function


[download id=”127″]

About the Author

John MacDougall

John MacDougall

John is a Microsoft MVP and qualified actuary with over 15 years of experience. He has worked in a variety of industries, including insurance, ad tech, and most recently Power Platform consulting. He is a keen problem solver and has a passion for using technology to make businesses more efficient.


Subscribe for awesome Microsoft Excel videos 😃

Related Posts

IFNA function

This function will return a specified value if your given expression results...

read more

TRUE function

This function will return the TRUE value. This is the same as just entering...

read more


1 Comment

  1. Jagbir Singh


    Noticed the picture of Abu. He/She is very cute. I am very sorry to know you have lost Abu. We have recentlly lost our family dog – Fluffy. He was born on 10-Nov-2007 and left us on 20-Aug-2020. Almost the same times as Abu, lagging by 4 months on each end. He was a small white pomeranian and has left quite a hole in our hearts. I understand how painful Abu’s loss would have been. Please accept my heartfelt condolences.

    With best regards.

Get the Latest Microsoft Excel Tips

Follow Us

Follow us to stay up to date with the latest in Microsoft Excel!

Subscribe for awesome Microsoft Excel videos 😃