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

Creating lookup tables

From: Excel 2010 Essential Training

Video: Creating lookup tables

When you have a lot of data in a worksheet, there's a great set of functions called Lookups that can help you extract specific data. Let's take a look. We have two or sort of three related functions. One function is called VLOOKUP. V stands for vertical and you do that if you have your data arranged down by column. There's also an HLOOKUP, horizontal just in case your data are arranged across rows. Those are really the only two functions you want to deal with. They're sort of a third simply called Lookup and it'll work but it's legacy.

Creating lookup tables

When you have a lot of data in a worksheet, there's a great set of functions called Lookups that can help you extract specific data. Let's take a look. We have two or sort of three related functions. One function is called VLOOKUP. V stands for vertical and you do that if you have your data arranged down by column. There's also an HLOOKUP, horizontal just in case your data are arranged across rows. Those are really the only two functions you want to deal with. They're sort of a third simply called Lookup and it'll work but it's legacy.

It's from older versions of Excel. You really don't want to use it but I just have it here because you might encounter it once or twice. Well, let's talk about the syntax of the Lookup function. Now whether its HLOOKUP or VLOOKUP, the syntax works the same and vertical is much more common. So we say =VLOOKUP and then you have a Lookup value, which is the way you're going to find the data, the key to your data area. Your data range is where you have all your data, and then you can figure out which column you want to get your data from and the true/false we will talk about in a minute. So let's take a look.

The Lookup value is something typical like a product code, maybe a Social Security Number, maybe an employee ID. It's really whatever is the key that will find your record, and if you're familiar with databases, this is what you would call a primary key. It's some unique identifier that tells us which row we want. Now, the data range is the entire data area, all of the columns that you're looking for. Now, once you have that in place, you want to find which column you are going to match. And columns are done by number.

So let's say you have Column A through F where you have all your data. Well Column A is column 1, Column F is column 6 and so on. But it doesn't have to be this way. So for example, if you start with your data in Column B, Column B is column 1 and than Column C is column 2 and so on. So try not to get confused there. Now, the true/false will let you decide, do you want an exact match for the data you're looking for or is that an approximate match? And if you put in true and you literally put the word true, true means an approximate match.

And if you put literally the word false, Excel will give you an exact match. So let's go ahead and put this to work. In this worksheet, here we have product codes, descriptions, some monthly sales, and we have some totals. What we want to do is we want a plug- in the product code here, let Excel read down the column and once it finds the product code we wanted, it'll read across and find okay here's the description and here's the total. So we are going to put our Lookup function in B4. But before we do that, we want to identify this data area.

Click anywhere inside that data area and let's select all the data. The easiest way to select all the data just press Ctrl+A. We are going to give this a range name. Now, you don't have to give it a range name, but believe me it's a lot easier to deal with. So click up here in the name box and when that becomes highlighted just type the word data and press Enter. And if you're not familiar with range names, that means you can click somewhere here, have nothing selected, click this down arrow on the name box, and when you select data that selects all your data.

You don't have to name it data. You can call it anything you want. So let's click in cell B4 and will say =VLOOKUP. Now as you are typing it, by the time you type =vlo, Excel recognizes that you want the VLOOKUP. So you can continue typing it or if you want to save yourself the trouble of typing, just press the Tab key and it will fill in for you. So the first thing we want is our Lookup value. So that's this code we were talking about that's going to look down here. So right now that's an A4 and that's the first argument. Type a comma. The second argument is the entire table that we were dealing with.

Now, since we know that it's called data, you can type it in and you see Excel even confirms it for you. But let's say you're doing several months down the road and forgot what you called it. I am just going to Backspace over here. If you don't remember what your range name is called, you could press the F3 key and in the Paste Name dialog box it'll tell you, then you could just double-click. Whichever way you like is fine. So type a comma. Now, we need to decide which column number. Well, we want to put in the description, and when you look at the data area, you see the Description is Column 2. So literally type in a 2.

Now, that's that argument so type in at comma and here's the true/false. We want an exact match so you can either type the word false or if it comes up here you can just double- click it, and that's it. In the parenthesis, I'll just press Ctrl+ Enter so I just stay there, and then we can see. Code C0123 is Cooking oil standard 8 ounces. But before we go and play with this, let's put in another one just for practice. Click here in Cell C4 and again type = VLOOKUP and again I'll just press Tab and Excel does the typing for me.

Now, the Lookup value is the same as the last one we did. It's still going to be here so Excel can find it down there. So A4 is the same. Type a comma. The table array is the same. I'll just type in the word data. We talked about that before. Type in it a comma. Now, the index number, well we are going to count it 1-2-3-4-5-6. So Total is the sixth column. So in your formula, literally type in a 6 and a comma, and just like before we want an exact match. So instead of clicking it this time, I literally type in the word false.

Close the parentheses, press Ctrl+ Enter, and now we can see C0123. Our product code is C0123. Cooking oil standard eight ounces. The total is 6153. Well, now let's change the product code in Cell A4 and see what happens. I'll type then S123 and this is not case-sensitive. Press Ctrl+Enter. Now S123 it finds, seasoning is extra origin 12 ounces, and the total is 60,192. We are going to click in here, and we will type SH124, and enter in SH124 is 6 ounce shampoo and the total is 70,098.

So if you have a lot of data and you want a quick way of querying this little database, it's hard to be the Lookup functions.

Show transcript

This video is part of

Image for Excel 2010 Essential Training
Excel 2010 Essential Training

80 video lessons · 126148 viewers

Bob Flisser
Author

 
Expand all | Collapse all
  1. 1m 35s
    1. Welcome
      57s
    2. Using the exercise files
      38s
  2. 19m 31s
    1. Exploring three common uses for Excel
      3m 17s
    2. Touring the interface
      3m 38s
    3. Finding the commands you need
      3m 51s
    4. Using Backstage view or the File tab
      3m 25s
    5. Maintaining file compatibility
      5m 20s
  3. 21m 23s
    1. Creating a worksheet
      5m 23s
    2. Techniques for copying and pasting
      3m 57s
    3. Entering data automatically with Auto Fill
      4m 37s
    4. Targeting large data groups
      4m 26s
    5. Changing a worksheet's structure
      3m 0s
  4. 47m 50s
    1. Understanding formulas and functions
      4m 41s
    2. Entering data in a worksheet
      3m 22s
    3. Adding numbers manually
      5m 1s
    4. Adding numbers using Sum and AutoSum
      6m 11s
    5. Adding a whole worksheet
      1m 48s
    6. Working with numbers in columns
      4m 53s
    7. Preventing errors using absolute references
      5m 57s
    8. Working with times and dates
      3m 8s
    9. Using IF
      4m 49s
    10. Using SUMIF and AVERAGEIF
      4m 15s
    11. Naming and using cell ranges
      3m 45s
  5. 33m 57s
    1. Formatting numbers and dates
      7m 6s
    2. Applying fonts, background colors, and borders
      4m 35s
    3. Adjusting columns, rows, and text
      5m 2s
    4. Using conditional formatting
      4m 6s
    5. Using custom conditional formatting
      5m 49s
    6. Adding pictures and shapes
      7m 19s
  6. 25m 27s
    1. Inserting SmartArt
      6m 54s
    2. Coordinating a look using themes
      3m 22s
    3. Applying built-in styles
      3m 16s
    4. Creating and sharing styles
      5m 33s
    5. Using templates
      4m 9s
    6. Creating and using original templates
      2m 13s
  7. 13m 23s
    1. Making the pieces fit
      4m 57s
    2. Inserting headers and footers
      3m 51s
    3. Printing and PDFs
      4m 35s
  8. 34m 3s
    1. Finding and replacing data
      3m 12s
    2. Freezing panes
      3m 0s
    3. Repeating row and column titles
      3m 34s
    4. Creating multiple custom worksheet views
      5m 18s
    5. Hiding or grouping rows and columns
      5m 31s
    6. Managing worksheets
      7m 23s
    7. Calculating formulas across worksheets
      6m 5s
  9. 36m 34s
    1. Importing and exporting data in Excel
      8m 2s
    2. Setting workbook permissions
      6m 44s
    3. Inserting and editing comments
      6m 49s
    4. Sharing a workbook
      1m 25s
    5. Tracking changes
      3m 5s
    6. Saving files in shared locations
      10m 29s
  10. 27m 30s
    1. Splitting cell data into multiple cells
      2m 22s
    2. Joining data from multiple cells
      4m 18s
    3. Basic and multi-field sorting
      6m 30s
    4. Using tables to sort and filter data
      4m 31s
    5. Inserting automatic subtotals
      3m 46s
    6. Creating lookup tables
      6m 3s
  11. 32m 56s
    1. Using auditing to diagram
      6m 3s
    2. Using evaluation in Excel
      2m 2s
    3. Working with Goal Seek
      5m 29s
    4. Using data tables in formulas
      6m 2s
    5. Using scenarios in formulas
      5m 28s
    6. Exploring the Analysis Toolpak
      7m 52s
  12. 18m 1s
    1. Discovering PivotTables
      2m 22s
    2. Creating a basic PivotTable
      2m 46s
    3. Modifying a PivotTable
      6m 57s
    4. Creating and modifying a PivotChart
      5m 56s
  13. 26m 58s
    1. Choosing chart types
      1m 55s
    2. Inserting Sparklines
      3m 54s
    3. Creating a column chart
      3m 23s
    4. Modifying a column chart
      5m 47s
    5. Creating and modifying a pie chart
      6m 45s
    6. Placing Excel charts into other Office applications
      5m 14s
  14. 21m 53s
    1. Understanding macros
      3m 5s
    2. Recording and using a simple macro
      11m 58s
    3. Editing a macro
      6m 50s
  15. 20m 33s
    1. Customizing the Quick Access toolbar
      3m 30s
    2. Customizing the Ribbon bar
      8m 44s
    3. Setting Excel options
      8m 19s
  16. 16s
    1. Goodbye
      16s

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 2010 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
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.