lundi 21 mai 2018

How to Use the IF Function in Excel

This wikiHow teaches you how to use the IF function in Excel to make a logical comparison between a value and the expected result. The IF function basically says “If something is true, then do something. If not, do something else.”

EditSteps

  1. Open Microsoft Excel. If you’re using Windows, Type into the search bar and click Microsoft Excel in the results. If you’re on a Mac, you should find Excel on the Launchpad.
    Use the if Function in Excel Step 1.jpg
  2. Open a workbook. Select the workbook you want to edit, or click Blank workbook to create one from scratch.
    Use the if Function in Excel Step 2.jpg
  3. Click the cell where you want the IF function’s results to show. This is the cell in which you’ll type the formula.
    Use the if Function in Excel Step 3.jpg
    • Let’s say column C contains test scores ranging from 72 to 98. These scores appear in cells C2, C3, C4, and C5. A passing grade is 75 and higher, while all scores below 75 are fails. We’d like the word “PASS” to appear next to a passing grade, and “FAIL” next to a failing grade. In this case, we'd want to enter the formula in D2, next to the first score.
  4. Type the formula using this example. The syntax for IF is . Here's what the formula would look like for our test scores example:
    Use the if Function in Excel Step 4.jpg
    • .
  5. Press or . This runs the formula.
    Use the if Function in Excel Step 5.jpg
    • Using our example, if the score is 75 or over, the word PASS will appear in the cell. If it’s less than 75, you’ll see FAIL.
  6. Drag the formula down to the other cells in the column. In our example, we’ve entered the formula into C2, so we'd drag the bottom-right corner of C2 cell down until all cells between C2 and C5 are highlighted. This runs the formula on the remaining data.
    Use the if Function in Excel Step 6.jpg

EditQuick Summary



source How to of the Day https://ift.tt/2IyEKk4

Aucun commentaire:

Enregistrer un commentaire