Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Summarizing data using an IF function

From: Excel for Mac 2011 Essential Training

Video: Summarizing data using an IF function

If you've ever ordered materials from a supplier, you've probably discovered that they offer a discount if you order larger quantities of the item; for example, if your order company t-shirts, you'll probably pay a lot less per shirt if you order 100 than if you just order 10. Another common scenario is that a salesperson can earn a higher commission if they exceed their sales goal for a month. When you need to determine which of several rules to use when you calculate a result, you can create a formula that includes an If function. An If function checks to see whether a value or a statement of any kind matches a certain criteria.

Summarizing data using an IF function

If you've ever ordered materials from a supplier, you've probably discovered that they offer a discount if you order larger quantities of the item; for example, if your order company t-shirts, you'll probably pay a lot less per shirt if you order 100 than if you just order 10. Another common scenario is that a salesperson can earn a higher commission if they exceed their sales goal for a month. When you need to determine which of several rules to use when you calculate a result, you can create a formula that includes an If function. An If function checks to see whether a value or a statement of any kind matches a certain criteria.

If it does, it uses one rule. If not, it uses another to find a result for the formula. I'll just jump in and do a quick example. Let's say that I have sales representatives and if they make their sales goal or if they exceed their sales goal, they get a 6% commission. If they exceed it by more than 10%, they get an 8% commission, and if they fall below their goal, they get 5%. Well, let's see how that works out. I'm going to create an If formula, so I'll type =If and then a left parenthesis.

The first thing that I need to enter into this formula is the logical test. This is what Excel is going to be checking the values against. And in this case I want to start out checking to see if the actual sales - and in this row that value is in cell C2 - to check to see if it is greater than the sales goal. That is B2. Then I'll type a comma. The next thing I need to enter is what Excel should do if the value is true. In other words, is the value in C2 greater than the value in B2? If it is, my salesperson will get a 6% commission, and I type that in as C2*.06.

In other words I'm not multiplying the value in C2 - their actual sales - by 6%, or .06. Then I type a comma, and now I need to tell Excel what to do if the formula is false. In other words, what should Excel do if the value in C2 is less than or equal to the value in B2? In that case we're giving them a 5% commission, so the value is C2*.05. That looks good. I'll type a right parenthesis, press Return, and we get the value of $15,000.

Now, that's correct as far as it goes, but remember earlier that I said that if a salesperson exceeded their goal by more than 10% then they would get an 8% commission. That happened in this case; 10% of 210,000 is 21,000. So that means that if the salesperson sold more than 231,000 then they should get an 8% commission. They did, but I only gave them 6%. That means I need to fix the formula. You probably noticed though, that when I was creating the formula, I only had room to enter three things: the logical test; what to do if the test was met, if the value was true; and what to do if the value was false.

There is a way to work with If formulas, where you can nest them, where you can create a second If function within another, and that way you can create multiple tests. So I'll show you how to do that now. Rather than try to edit the formula as it is, I'll just create a new one. So I'll type =If and a left parenthesis. Now, I'm going to create my logical test. So, remember, I'm checking to see if the salesperson exceeded their goal by 10% or more, if they met their goal, or if they fell short of their goal. The problem is that if someone exceeds their goal by more than 10%, then if I create the rule I had before, asking if the value in C2 is greater than the value in B2, then it will always apply a 6% commission.

It doesn't check to see if the salesperson exceeded their goal by more than 10%. That means I need to put my most restrictive condition first. So what I'm going to check for is whether the value in C2 was greater than or equal to the value in B2 multiplied by 110%, which is 1.1. Now, I can say if the value is true then the formula should return C2 - their actual sales - times .08.

Now I type the comma, and I tell Excel what to do if the sales are not greater than 110% of the target. To do that, I'll create a second If function inside the first, type a left parenthesis, and now I test to see if the value is greater than the value in B2, in other words if the salesperson exceeded their goal. So for that I typed the condition I had before: If C2 is greater than B2. If that's true, then I given them a 6% commission which is C2*.06.

If it's not, then I give them a 5% commission. I don't need to create another If statement because I can use the value If false argument or part of the formula to find the value that I want, and that is C2 *.05. Now I type a right parenthesis to close the second If function, but you'll notice that this right parenthesis is green. The first left parenthesis for the formula is black, so I have a black left parenthesis here.

I have green left parenthesis here, a green right parenthesis, and that's one way that Excel helps you balance the parentheses in your formulas. So I see green, and I know that the first one will always be black, so when I type a right parenthesis I have a black parenthesis, a black parenthesis. The green matches the green. I can press Return and get my value, and 250,000 times 8% is indeed 20,000. Now I can copy the formula down for my other sales representatives.

So I will grab the fill handle and drag it down, and because I used relative references in the formulas, Excel copies them down, and it works off of the values in the same row. The If function lets you create versatile formulas to calculate values. When you need to apply different rules depending upon sales or other results, creating a formula that uses an If function will let you calculate the answer you need.

Show transcript

This video is part of

Image for Excel for Mac 2011 Essential Training
Excel for Mac 2011 Essential Training

100 video lessons · 31699 viewers

Curt Frye
Author

 
Expand all | Collapse all
  1. 1m 58s
    1. Welcome
      1m 16s
    2. Using the exercise files
      42s
  2. 20m 56s
    1. Exploring the Excel 2011 window
      4m 16s
    2. Introducing the Ribbon for Mac
      4m 44s
    3. Customizing the Ribbon
      4m 20s
    4. Setting program preferences
      3m 20s
    5. Getting help in Excel
      4m 16s
  3. 20m 4s
    1. Opening, creating, and saving workbooks
      5m 23s
    2. Setting workbook properties
      4m 14s
    3. Creating and modifying workbook templates
      4m 18s
    4. Managing workbooks across multiple versions of Excel
      6m 9s
  4. 1h 2m
    1. Selecting cells and groups of cells
      4m 58s
    2. Copying and pasting cell data
      2m 39s
    3. Entering data using AutoFill and other techniques
      4m 32s
    4. Inserting symbols and special characters
      5m 3s
    5. Creating an Excel table
      4m 43s
    6. Locating and changing data using Find and Replace
      4m 57s
    7. Restricting input using validation rules
      4m 42s
    8. Using lists to limit data entered into a cell
      2m 32s
    9. Sorting worksheet data
      3m 2s
    10. Creating a custom sort order
      3m 54s
    11. Filtering worksheet data
      4m 6s
    12. Inserting, moving, and deleting cells and cell ranges
      3m 50s
    13. Splitting and freezing rows and columns
      3m 51s
    14. Managing worksheets
      5m 28s
    15. Creating, editing, and deleting headers and footers
      4m 41s
  5. 1h 17m
    1. Introducing Excel formulas and functions
      3m 17s
    2. Adding a formula to a cell
      4m 0s
    3. Introducing arithmetic operators
      4m 13s
    4. Using absolute and relative cell references
      6m 29s
    5. Controlling how Excel copies and pastes formulas
      6m 5s
    6. Referring to Excel table data in formulas
      2m 3s
    7. Creating an AutoSum formula
      3m 22s
    8. Summarizing data on the status bar
      2m 22s
    9. Joining text in cells with concatenation
      3m 59s
    10. Summarizing data using an IF function
      6m 21s
    11. Summarizing data using SUMIF and other conditional functions
      5m 41s
    12. Creating formulas to count cells
      2m 37s
    13. Rounding cell values up and down
      4m 55s
    14. Finding data using VLOOKUP and HLOOKUP
      6m 33s
    15. Auditing formulas by identifying precedents and dependents
      3m 25s
    16. Managing Excel formula error indicators
      4m 42s
    17. Managing scenarios
      4m 59s
    18. Performing Goal Seek analysis
      2m 31s
  6. 45m 48s
    1. Applying fonts, background colors, and borders
      6m 7s
    2. Applying number and date formats to cells
      7m 1s
    3. Managing text alignment
      3m 56s
    4. Copying cell formats
      4m 2s
    5. Managing cell styles
      3m 16s
    6. Managing Office themes
      3m 31s
    7. Creating rule-based conditional formats
      3m 54s
    8. Defining Top 10 conditional formats
      4m 19s
    9. Defining data bar, color scale, and icon set conditional formats
      6m 6s
    10. Editing, ordering, and deleting conditional formats
      3m 36s
  7. 36m 55s
    1. Creating bar and column charts
      5m 26s
    2. Creating pie charts
      2m 32s
    3. Creating line charts
      4m 34s
    4. Creating XY (scatter) charts
      1m 49s
    5. Creating stock charts
      4m 11s
    6. Changing chart types and layouts
      2m 22s
    7. Changing the appearance of a chart
      4m 25s
    8. Managing chart axes and numbering
      2m 51s
    9. Adding trendlines to charts
      4m 14s
    10. Creating sparkline charts
      4m 31s
  8. 18m 39s
    1. Importing data from comma separated value (CSV) or text files
      4m 20s
    2. Connecting to an external data source
      2m 22s
    3. Using hyperlinks
      6m 1s
    4. Including an Excel workbook in another Office document
      3m 5s
    5. Linking to an Excel chart from another Office program
      2m 51s
  9. 26m 21s
    1. Creating and formatting shapes
      3m 10s
    2. Adding and adjusting images
      5m 38s
    3. Cropping, compressing, and removing image backgrounds
      4m 46s
    4. Creating SmartArt graphics
      5m 7s
    5. Creating WordArt
      2m 34s
    6. Aligning and layering objects
      5m 6s
  10. 29m 51s
    1. Introducing PivotTable reports
      3m 47s
    2. Creating a PivotTable report
      4m 37s
    3. Pivoting a PivotTable report
      3m 18s
    4. Managing subtotals and grand totals
      3m 23s
    5. Summarizing more than one data field
      1m 34s
    6. Changing the data field summary operation
      2m 40s
    7. Changing the data field number format
      2m 27s
    8. Filtering a PivotTable report
      2m 46s
    9. Applying a PivotTable style
      2m 20s
    10. Creating and editing styles
      2m 59s
  11. 26m 47s
    1. Checking spelling
      3m 32s
    2. Setting AutoCorrect and automatic Replace options
      3m 59s
    3. Managing workbook comments
      3m 40s
    4. Tracking and reviewing changes
      5m 12s
    5. Printing a worksheet or workbook
      3m 44s
    6. Setting and removing print areas
      2m 31s
    7. Exporting to other formats
      1m 33s
    8. Protecting a workbook
      2m 36s
  12. 23m 52s
    1. Running an existing macro
      4m 56s
    2. Recording a macro
      3m 56s
    3. Recording a macro using relative references
      6m 15s
    4. Renaming, viewing, and deleting macros
      2m 58s
    5. Adding comments to a macro
      2m 43s
    6. Turning off screen updating in a macro
      3m 4s
  13. 1m 1s
    1. Additional resources
      1m 1s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Excel for Mac 2011 Essential Training.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member ?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferences from the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.