Start learning with our library of video tutorials taught by experts. Get started

Excel for Mac 2011 Essential Training

Finding data using VLOOKUP and HLOOKUP


From:

Excel for Mac 2011 Essential Training

with Curt Frye

Video: Finding data using VLOOKUP and HLOOKUP

When you maintain lists of data in Excel, you'll find it useful to be able to look up values in those lists. Rather than page through your data by hand or use the find feature, you can create formulas that enable you to enter a lookup value in a cell and have Excel return related information from a list or an Excel table. The lookup formula that you use in a table depends on whether you're data is laid out by column, as this is, or if it's laid out by row. If it's laid out by column, you use something called a VLOOKUP - the V stands for vertical - or by row, in which case you'd use HLOOKUP - the H stands for horizontal.
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

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
Please wait...
Excel for Mac 2011 Essential Training
6h 32m Beginner Oct 26, 2010

Viewers: in countries Watching now:

In Excel for Mac 2011 Essential Training, author Curt Frye gives a comprehensive overview of Excel, the full-featured spreadsheet software from Microsoft. The course covers key skills such as manipulating workbook and cell data, using functions, automating actions, printing worksheets, and collaborating with others. Exercise files accompany the course.

Topics include:
  • Customizing the Ribbon
  • Formatting worksheets, cells, and cell data
  • Sorting and filtering data
  • Working with formulas
  • Detecting formula errors
  • Creating charts
  • Importing data
  • Inserting objects and graphics
  • Using PivotTables
  • Recording macros
  • Sharing workbooks
Subjects:
Business Spreadsheets
Software:
Excel Excel for Mac Office for Mac
Author:
Curt Frye

Finding data using VLOOKUP and HLOOKUP

When you maintain lists of data in Excel, you'll find it useful to be able to look up values in those lists. Rather than page through your data by hand or use the find feature, you can create formulas that enable you to enter a lookup value in a cell and have Excel return related information from a list or an Excel table. The lookup formula that you use in a table depends on whether you're data is laid out by column, as this is, or if it's laid out by row. If it's laid out by column, you use something called a VLOOKUP - the V stands for vertical - or by row, in which case you'd use HLOOKUP - the H stands for horizontal.

VLOOKUP is by far the more common of the two, so I'm going to concentrate on that. If you want to learn more about HLOOKUP, then you can find it in the Help system. So my goal is to type a value into cell F1, in this case it will be a product code, one of these four codes in this example, and then have the formula in cell F2 use that value to look up the name of the product, or in this case the flavor, or the infusion of the olive oil that's made by the Two Trees Company. So to create this formula, type =vlookup(.

Once you do that, you can start entering in the formula's arguments. The lookup value is the value that Excel will check for in the first column of your table, in this case A4 through A7. We're going to type that product code here, in cell F1, so I'll type F1. Next I need to type in the table_array. The table_array is the table of data, or in this case the list, where Excel should look. That starts on A3 and ends on C7. Don't get confused and include a header. Make sure that it's only the actual data table down here.

So that goes from A3 to C7. I'll type that in A3: C7 and a comma, and now the index number. The index number is the table column from which you're going to look up the value. We have column one, which is the Product Number, and then column two, which contains the information we want, column number two, and then finally we have an optional argument called range_lookup. Basically what range_lookup does is ask whether or not Excel can have an approximate match. If it's an approximate match, then for example, if I were to type in P005, which is larger than the last value in the first column of the table, then it would say, well, P005 is larger than the last value, but I'm going to return the last value, because that's probably what was meant.

In this case I don't want to allow Excel to return an approximate match. I only want exact matches, so I get the exact product. So I'll type in False. If I typed in True or left that argument blank, then Excel would allow approximate matches, but because I'm typing in False, it won't. Type a right parenthesis, press Return and you see that I have an N/A, or not available error. The reason that occurs is because there is no value in cell F1, but if I type in P001 and press Return, then I get the value Lemon in cell F2 through the formula.

The reason that happens is because Excel looks in the table, looks in the first column and sees P001, which is the value in cell F1, and then it looks at column two and finds the cell in that row. That's Lemon, which is the value that's returned here. If I already change this value to P003, we would get Rosemary, which is here, and just for an example if I were to type in P005, which does not occur in the column and press Return, we get the same error again. Now I'll go into a little more detail and show you how to use approximate matches.

So let's go to our Discounts page, and the idea here is that we want to be able to calculate the quantity discount that we're going to give to our customers. If they order Quantity 1, no discount, if they order at least Quantity 10, 5% and other discounts based on other quantities. So let's now try to lookup the discounts for quantities that are entered into cell F1. So we use a VLOOKUP formula again, vlookup, left parenthesis. The lookup_value is in cell F1. The table_array goes from A3: B8, column index number, we're looking up our discounts - that will be column number 2. And we're allowing approximate matches, so that means that I can either leave the range_lookup argument blank, or as I prefer to do, I can type in True.

I usually type the range_lookup argument into the VLOOKUP formulas that I create, just so that I remember whether I'm allowing approximate matches or not. I can't always remember what the default is, so I put it in to make it explicit, so it's easy for me, and anyone else to remember. So my formula looks good. I will type a right parenthesis to close it, press Return, and we get the error, but as soon as I enter a quantity in cell F1, such as quantity 10 and press Return, then I see the discount of 5%. But what would happen if I were to enter say, 15? There is no 15 here in the Quantity column, but if I type the number 15 into cell F1, Excel uses its approximate matching capability and sees that even though there is no 15 here, 15 is greater than 10 but less than 100, so that means that it looks here and applies this Discount.

The same thing would occur if I were to type 1,500, which is greater than 1,000 but less than 10,000. Hit Return. And if I were to type 20,000, which is greater than the last entry of 10,000 and hit Return, then I still get the same discount. The only time that I would have an error allowing approximate matching is if the number is less than the lowest number in this column. Now you notice that the numbers in this column are sorted from lowest to highest; in other words, they are sorted in ascending order.

If you're going to use approximate matches, it is absolutely vital - actually required - that you sort your data in ascending order. If you don't, the formula will fail. So if I were to type in a zero, I'll once again get the N/A error, and that's because that number is lower than the lowest value in the list over here. The VLOOKUP function is extremely useful because it lets you use one value, such as the Product Number, to find another value, such as the product's name or price. It might seem a little complicated at first, but you'll find it comes in handy once you learn how to use it.

Find answers to the most frequently asked questions about Excel for Mac 2011 Essential Training.


Expand all | Collapse all
Please wait...
Q: Where can I learn more about Excel formulas?
A: Discover more on this topic by visiting Excel formulas on lynda.com.
Share a link to this course
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.
Upgrade now


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.

Upgrade now

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 preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Welcome to the redesigned course page.

We’ve moved some things around, and now you can



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.

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