Excel: The IF Function
What is the IF function? Excel Help says:
"Returns one value if a condition you specify evaluates to TRUE and another value if it evaluates to FALSE.
Use IF to conduct conditional tests on values and formulas."
But this is a little vague.
Simply put, a teacher could use the IF function to assign letter grades to percentages on quizzes and tests in her grade book. For example: IF a student has a 90 or greater, assign the value of "A". IF a student has an 80 or greater, assign the value of "B", and so on. Unfortunately, Excel doesn't understand English, so we have to write a formula.
Your assignment is to devise a formula for a rating system for your stocks where a stock that has increased 3% or more from the beginning to today would earn an "A"; 2% or more a "B"; 1% or more a "C"; 0% or more a "D"; and less than 0% an "F".
- To start, type "Lesson 7" in cell A29. Bold this cell.
- Type "Rating" in cell B29. Bold this cell.
- Then retype or copy and paste your company names in cells A30 to A39.
- The Formula should be stored in B30 to B39. The formula should reference column V.
This will be a rather long formula.
Here is a sample formula for the grade book example above:
=IF(A1>=90,"A",IF(A1>=80,"B",IF(A1>=70,"C",IF(A1>=60,"D",IF(A1<=59,"F")))))
Hint: The above formula references cell A1. Which cell will your formula reference (it isn't A1)?