1 / 12

Computer Science & Engineering 2111

Computer Science & Engineering 2111. IF Function. IF FUNCTION. Checks to see if a condition is true or false. If true one thing happens, if false another thing happens IF this is true, do this, else do this. =IF(logical test, value_if_true , [ value_if_false ])

Download Presentation

Computer Science & Engineering 2111

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Computer Science & Engineering 2111 IF Function CSE 2111 Lecture-IF Function

  2. IF FUNCTION Checks to see if a condition is true or false. If true one thing happens, if false another thing happens • IF this is true, do this, else do this. =IF(logical test, value_if_true, [value_if_false]) • Logical test must evaluate to true or false CSE 2111 Lecture-IF Function

  3. CSE 2111 Lecture-IF Function

  4. NESTED IF • IF this is true, do this, else IF this is true, do this, else, do this. =if(this = true, do this, else if(this = true, do this, otherwise do this)) • Can be nested up to 30 times. CSE 2111 Lecture-IF Function

  5. Assume no student has the same score. CSE 2111 Lecture-IF Function

  6. IF with a range CSE 2111 Lecture-IF Function

  7. Scores New Stats CSE 2111 Lecture-IF Function

  8. Write a formula in cell NewStats!F2 to determine if everyone passed the class. (A passing score is 320)Display the text, “Everyone”, or “Not Everyone” =IF(AND(Scores!E5>=Scores!B2,Scores!E6>=Scores!B2,Scores!E7>=Scores!B2),"Everyone", "Not Everyone") CSE 2111 Lecture-IF Function

  9. Write a formula in cell New Stats!F3 to determine if all the students are honors students.Display the text, “All Honor Students”, or “Not Everyone is an Honor’s student” =IF(AND(Scores!F5:F7),"All Honor Students", "Not Everyone is an Honors student") CSE 2111 Lecture-IF Function

  10. Write a formula in cell New Stats!F4 to determine if Led Zeppelin’s total score and Rob Thomas’ total score is greater than Rascal Flat’s total score.Display the text, “Led and Rob”, or Rascal” =IF(AND(Scores!E5>Scores!E7,Scores!E6>Scores!E7), "Led and Rob", "Rascal") CSE 2111 Lecture-IF Function

  11. Write a formula in cell New Stats!F5 to determine if at least one person passed the class.Display the text, “At least one passed” or “No One passed” =IF(OR(Scores!E5>=Scores!B2,Scores!E6>=Scores!B2,Scores!E7>=Scores!B2),"At least one passed", "No One passed") CSE 2111 Lecture-IF Function

  12. Write a formula in cell New Stats!F6 to determine if at least one person is an honors student.Display the text, “At least one Honors student”, or “No Honor students”) =IF(OR(Scores!F5:F7),"At least one Honors student", "No Honor students") CSE 2111 Lecture-IF Function

More Related