• Like
Excel Spreadsheets If statements
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Excel Spreadsheets If statements

  • 662 views
Published

 

Published in Education
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
662
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
7
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. What is an IF statement?
    • IF(Logical_test , value_if_true , value_if_false)
    • A statement that checks the contents of a cell against a given expression. If the expression is TRUE the first value is returned. If the expression is FALSE the second value is returned.
  • 2. Examples of IF Statements
  • 3. Example 1
    • =IF(A3=A1+A2, “Correct”, “Wrong”)
    • The Logical_test is A3=A1+A2 i.e. does cell A3 equal cell A1 plus cell A2?
    • The Value_if_true is “Correct” i.e. if cell A3 equals cell A1 plus cell A2 display “Correct”
    • The Value_if_false is “Wrong” i.e. if cell A3 does NOT equal cell A1 plus cell A2 display “Wrong”
    Go to Pg 2
  • 4. Example 2
    • =IF(A1>A2, “A1 is bigger than A2” , “A2 is bigger than A1”)
    • The Logical_test is A1>A2 i.e. is cell A1 bigger than cell A2?
    • The Value_if_true is “A1 is bigger than A2”
    • The Value_if_false is “A2 is bigger than A1”
    Go to Pg 2
  • 5. Example 3
    • =IF( AND( ISBLANK(C1), ISBLANK(C2), ISBLANK(C3) ) , “This column is empty” , “This column is not empty” )
    • The Logical_test is AND( ISBLANK(C1), ISBLANK(C2), ISBLANK(C3) ) i.e. Is cell C1 AND C2 AND C3 empty?
    • The Value_if_true is “This column is empty”
    • The Value_if_false is “This column is not empty”
    Go to Pg 2
  • 6. Example 4
    • =IF( OR( D1=7, D2=7, D3=7) , “There is a seven in this column” , “There is no seven in this column” )
    • The Logical_test is OR( D1=7, D2=7, D3=7)
    • The Value_if_true is “There is a seven in this column”
    • The Value_if_false is “There is no seven in this column”
    Go to Pg 2
  • 7. Example 5
    • =IF( AND( E1<=10, E1>=1) , E1 , “This number is too big”)
    • The Logical_test is AND( E1<=10, E1>=1)
    • The Value_if_true is E1 i.e. It displays the content of cell E1
    • The Value_if_false is “This number is too big”
    Go to Pg 2
  • 8. General Comments
    • We are creating a formula, so we must start with an equals, =
    • Excel can be very fussy, so we should always double-check that our brackets and commas match up
    • Excel only accepts round brackets, ( )
    • If we want to display text we must use speech marks, “ ”
    Go to Pg 2