navigate site menu

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

Setting Up a Database in Excel
John Hersey

Setting Up a Database in Excel

with Dennis Taylor

 


In this course, author Dennis Taylor shows how to use Excel for creating a simple database. The course explains the limits of Excel as a data management tool and spells out the design considerations for creating a database. It also demonstrates using tables to simplify database creation as well as the Form and Data Validation tools to manage data.
Topics include:
  • Understanding database design concepts
  • Using the Text to Columns feature
  • Creating fields
  • Using tables
  • Adding total fields
  • Formatting tables with the Design tab
  • Using the Form tool to build and view data
  • Using data validation to restrict data entries

show more

author
Dennis Taylor
subject
Business, Databases
software
Excel 2007, 2010
level
Appropriate for all
duration
43m 27s
released
Oct 21, 2011

Share this course

Ready to join? get started


Keep up with news, tips, and latest courses.

submit Course details submit clicked more info

Please wait...

Search the closed captioning text for this course by entering the keyword you’d like to search, or browse the closed captioning text by selecting the chapter name below and choosing the video title you’d like to review.



Introduction
Welcome
00:04Hi! I am Dennis Taylor and I am pleased to present Setting Up Tables, Lists and
00:09Databases in Microsoft Excel.
00:11In this course I'll show the best techniques for structuring data
00:14efficiently and coherently.
00:17We'll look at how to a setup a form for when you need to view data on a record
00:20by record basis or show you how to display your data as a table to provide
00:25structure and tools for more efficient layout.
00:27And we'll also show you the powerful data validation command to ensure that data
00:32will be entered more accurately and with its powerful pick list technique.
00:37It will be entered much faster as well.
00:39Let's get started with Setting Up Tables, Lists and Databases in
00:43Microsoft Excel.
Collapse this transcript
Using the exercise files
00:00If you are a Premium Member of the lynda.com Online Training Library or if you
00:05are watching this tutorial on the DVD-ROM, you have access to the Exercise files
00:10used throughout this title.
00:12As you open a file as I am now, you will see that there are a number of sheet tabs.
00:18Many of these will be referred to in the training, here and there you will see a
00:22tab that is not used at all.
00:24If you are monthly subscriber or annual subscriber to lynda.com, you don't
00:28have access to the Exercise files, but you can follow along from scratch with your own files.
00:33Let's get started!
Collapse this transcript
1. Database Design Concerns
Understanding design concepts for setting up large lists
00:00Excel has no hard and fast rules about how you build data in worksheet, and if
00:05you're setting up a database, whether it's about people, like the one we see on
00:09the screen here, your inventory or orders or shipments, regardless of the
00:13environment, a few basic concepts are going to make your use of that data much,
00:18much more efficient.
00:20In many respects this particular worksheet here embodies the basic principles of
00:25what good design should look like.
00:27Keep titles in a single row, they don't necessarily have to be in row one.
00:33If you need to have the company name here, put an empty row above row one,
00:37separate it from the rest of the data.
00:39In the data itself, don't have any empty rows, don't have any empty columns,
00:44that's probably unlikely anyway, don't put in spacing.
00:47We're going to see some other worksheets here that violate some of these rules.
00:51If you have other date on this worksheet that's necessary to have, for
00:55example, we will be using that TaxTable, for example.
00:58We need that here, but we don't want a part of our list, and the reason is that
01:03many, many times when you're working with large list, your database, you want to
01:08do Sorting and Filtering, possibly Subtotals, and use some of the other features
01:14available on the data tab.
01:15You might also want to use a Pivot table, found on the Insert tab.
01:19To use all of those features most efficiently, keep your data together,
01:24single, title row on top, row after row with no empty rows, column after
01:30column, no empty columns.
01:31Any data off to the right have at least one column to separate that from the data.
01:37Notice that you can have empty cells, column J has empty cells and it's totally
01:42appropriate based on the description of what's in there that's going to happen,
01:47that's not going to be a problem.
01:48And what this means too, if you stick to these rules, is that when you do
01:53sorting and filtering and use some of the other features on the data tab, you
01:57don't have to constantly highlight all the data before proceeding into those
02:02commands, just click on the single cell here.
02:04If we start the sort process right now, in the background you can see the data
02:08is automatically being highlighted.
02:10Now we can't see at all, and so there's one more suggestion I would make here
02:14too before using a lot of these different commands, and particularly if you're
02:18not too familiar with the data.
02:20A good little step ahead of time with the active cell in your data, press Ctrl+A
02:26and then to see how big this entire list is, press Ctrl+Period a few times.
02:31Now this seems like strange thing to do, it simply moves the active cell
02:35around the corners of the range, and that verifies the data that will be used
02:41when you click a single cell and start to do sorting and filtering and the other features.
02:47Now the next sheet in this workbook Interim Totals has totals put in here and
02:52that's all well and good, and that's interesting information, but if we want to
02:56do sorting and filtering and all those other things, these are in the way, we
03:00need to get rid of them.
03:02So you will see worksheets like this, and again, many, many times worksheets
03:07that don't work so well on Excel in terms of commands we're talking about,
03:11have been designed for appearance if for printing reasons or display reasons,
03:15and that's not always in sync with the actual need that you have to manipulate the data.
03:21The next worksheet over same basic idea really, but here the rows are empty.
03:27And the example here is that just brings out the data better, it is much easier
03:30to read, that's good.
03:32But on the other hand if we want to work with our data efficiently, this is not so good.
03:36So we need to get rid of the empty rows here, quick way to do that, manually
03:39select all the data and just sort it and then the empty rows will end up at the bottom.
03:44Multi-row titles, we mentioned that's not a great idea either.
03:47Fortunately, over the years excels has clean this up a bit, and we've seen cell
03:52A2, how the data should look, not Employee, and then Name, take a look what
03:57we've got in column D here, Social Security Number and Number.
04:01A quick fix here, by the way, if you did see data like this, would be to
04:05double-click right in front of the N in Number, type SS and press Alt+Enter,
04:11that introduces a line break.
04:13And once you get used to that concept, when you are putting in titles and you
04:17don't want the column to be wide, but you don't mind the data stacking up
04:21like this, type an entry, press Alt+Enter for a line break, and you can do it multiple times.
04:27So ideally you'd be doing that for these other cells over here too, and then get
04:31rid of row one, you want to have your titles on a single row.
04:35And sometimes you'll see data like this on this sheet here, this is based on a
04:40real-life example from a city that I did some work with, I've changed all the
04:43pertinent data really, but this is the basic layout in the way this looks.
04:47Again, it's good information but it laid out in such a way that you can't do
04:52sorting on it, you can't do filtering.
04:55What if we need to add data for the year 2012?
04:58How we're going to do that efficiently?
04:59You see the way that data is laid out here in column B for the year?
05:03Probably this was design for display reasons, people can look things up, that's
05:08again, all well and good, but if you want to work with this data efficiently,
05:12you have to go through some serious restructuring.
05:14And in this example here, probably what you're going to have to do is maybe
05:18put in a new column.
05:20For example, imagine in this section, if this data gets bumped to the right,
05:23take this data and then put it in here multiple times, then get rid of rows like
05:29this, and you get the idea here, we've got some work ahead of us, if we want to
05:33turn this into something that's going to be useful in Excel.
05:36And so all these different ideas will come together and the worksheet that we
05:40first saw here, and even though this is simply an HR list, it could certainly
05:44cover the basic idea that we want to see in all worksheets that we're going to
05:49be using the data commands.
05:51Titles on a single row, no empty rows, no empty columns on our data.
Collapse this transcript
Creating appropriate name, address, and time fields
00:00If you work with database software, for example, Access, you're probably
00:04familiar with the idea or the concept where each column or each field should
00:08contain the minimal amount of information necessary.
00:12And that's a bit vague.
00:14This particular worksheet has four potential problems, three major ones.
00:18As you look at this list, you might at some point say, well;
00:21I want to sort this by last name.
00:24Well, look at the data in Column A, first name, last name.
00:28That's great for mailing labels, but we cannot sort this list based on the
00:32data looking like that.
00:34Ideally, we should have those names either in separate columns, or we need
00:39to reverse the order.
00:40And similarly in Column C, if we wanted to sort this data by State or by Zip
00:47code, we cannot do that.
00:49And so the idea that each column should contain a minimal amount of information,
00:53starts to make a little bit of sense.
00:54Ideally, we should have a separate column for City and State and Zip.
01:01And if we have hundreds and hundreds of records, thousands of records, not
01:05only do we want to sort by State, but we want to have within each State, have
01:09those in order by City.
01:10So it would make good sense to split those into separate columns.
01:14Column B, perhaps less of an issue, depends upon the nature of the data, but you
01:18can imagine if this were data for a City Department, the Waterworks or the
01:22Street Works Department.
01:23If they need to notify people within a certain range of addresses on Harrison
01:28Street, there is no way to sort this data by Street name.
01:32And so, again, depending upon the nature of the data and what you're doing with
01:35it, the idea that you want to split your data into more columns is a good one.
01:40And it's much easier to pull data together when it's in separate columns, than
01:45to pull it apart when it's like the data we see here.
01:48And in Column D we're seeing an unorthodox use of dates.
01:52We can all read them and understand them, but we can't work with dates like that
01:56in any kind of computational sense.
01:58And all these different issues of cleaning up data, you'll get some good tips in
02:03the lynda.com course on Cleaning up Your Data.
02:06All of the issues here can be dealt with directly and ultimately they can be fixed.
02:12But this is not good design from a number of different perspectives.
02:15Keep a minimal amount of data in each column, and then your use of database
02:20features and efficient use of Excel is going to improve greatly.
Collapse this transcript
2. Tables
Using Excel tables for database data
00:00If you want to work with a database type of list efficiently or if you want to
00:04set up a new list with a minimum amount of difficulty, you might want to
00:08consider using Excel's Table feature.
00:11It was new in Excel 2007;
00:13it's actually the successor to the older feature called List, which was not
00:17so well implemented.
00:18This data here could look better;
00:21it could be easier to work with if we convert it into a Table.
00:24The next sheet over actually is the same data, but it has been converted into a Table.
00:30The first obvious difference is every other row is highlighted that makes it easier to read.
00:35As I'm scrolling here notice what's happening to the titles, now do you really
00:39care what the column letters are?
00:41Now you might, but on the other hand the Table emphasizes the idea that we've
00:46got field names that third column, whether it's column C or not it contains
00:52Department information that's the pertinent fact about that data.
00:55If it somehow bothers you and you do want to see the column letters simply apply
01:00the frozen titles feature, go to the View tab>Freeze Panes, Freeze that Top Row.
01:06Now there are other features related to Tables, one is filters are
01:11automatically in place that also means we can Sort the data quickly and easily,
01:15and anytime we use any of the database like features here, we don't need to
01:19highlight all the data.
01:21The Table concept treats our data as an entity and as we'll see, as we add rows
01:27and columns or new data to the right below everything will stay together intact,
01:33so there are some real advantages.
01:35Sometimes you want to start creating a list and you've got no data whatsoever,
01:40so on Sheet1 I do have a little bit of data just some titles, I might want to
01:44start by turning this into a Table as well, same idea.
01:49Now the way we convert data into a Table can actually be done four different
01:53ways, we can start with a keystroke shortcut Ctrl+T think of T for Table or
01:59Ctrl+L, L for list, more likely is the Insert tab and choose Table, now the
02:06active cells right there in the midst of that single title row, so we can start from here.
02:13Now as we type data in here, for example, I'll just put in the name here.
02:18I might not even have my other data to the right available yet, now I am going
02:21to put in name here and so on that becomes part of the Table automatically, we
02:26don't have to worry about that.
02:28So that you can start to see some advantages here, obviously, we don't enough
02:33data yet to do filtering, but the filter arrows are there waiting for us to use this.
02:38If we look at our original data that we first saw over here, this sheet here, or
02:42possibly data like this or possibly ScientificData, in all the cases here we
02:48might want to consider using this Table concept.
02:51This is ScientificData, pretty dry stuff, it won't even fit into our fields,
02:56sometimes it wants us to jump out a little bit, make it little more readable and usable.
03:00Let's turn it into a Table
03:02Insert Table, OK, Excel nearly always figures out your data accurately, a quick
03:08
03:08look at that, you should do each time.
03:11Make sure if your Table has headers and it probably does, you want the box
03:14checked, click OK, it's a lot more readable than it was before.
03:18We can work with the data better.
03:20So as we've seen, you can easily convert existing data into a Table, you can
03:25start with just a minimum amount of information and create a Table.
03:29The advantages are primarily going to be visual, but as we'll see, there are
03:33some additional features that make working with your data much, much more
03:37efficient if you convert it into a Table.
Collapse this transcript
Using the Ribbon Design tab to control table formatting
00:00When you convert a list into a Table, you automatically get this color layout,
00:05and that might be fine.
00:07However, anytime the active cell is within a Table, you do have a Table tools
00:13ribbon and Design tab, and we've got Table Styles off to the right, and how many
00:18choices do we have, if you're really counting, there is 61.
00:22We can easily make changes here and as we slide over these choices, we get a preview.
00:28Sometimes we do this just for the sake of variety, at other times we think of
00:31how this will look on the printed page, maybe we have printed some of these.
00:35Some of these look like their design has used up all the ink in your color
00:38printer, but you have your reasons for changing, and of course, it's really easy
00:42to make changes just by sliding over the one you want.
00:45Try this one for a while, that one for a while, and so on.
00:48If you're working with data and you want to convert it into a Table, another way
00:52to create a Table does give you the choice before actually seeing the Table, and
00:56that's on the Home tab if you choose, Format as Table, it's in the Styles group.
01:02And here, before actually seeing the data as a Table, we make a choice ahead of time.
01:07There is no live preview as we do this, so perhaps we're just guessing that
01:10how this will look.
01:11We'll pick one, and then looking at the dialog box quickly to confirm that
01:16Excel has chosen the proper amount by the data, Table has headers click OK, we have that choice.
01:22So just a slight difference in the way we use this, and here too, we can
01:25make these changes.
01:27Now there are some other things we might want to consider changing too, you'll
01:30see some choices here on the Design tab, Banded Rows;
01:34you probably do want those, although some people might want to have Banded Columns.
01:38Again, it might depend upon the nature of the data, and maybe that's a
01:41better choice here.
01:42I am pretty sure you wouldn't want both, if you try both of these, not a great choice.
01:47You also see choices here for First Column, so what happens when I choose First
01:53Column here, notice that Column A has a different look than the other data. Last Column;
01:58that's way off to the right in this contiguous list here, it's the same idea.
02:03Now as you experiment with different layouts here and you might want to consider
02:07doing that, then see the effect of that and you might have to comeback on some
02:11of these and try these again, and depending upon which these Table Styles you've
02:16chosen, the first row might not look that different.
02:19Sometimes all it does is make the text bold, so you want to experiment with that
02:23probably a little bit to see how that plays out.
02:26Well, what happen on this Table, for example, if we choose First Column up
02:30there in the Design tab?
02:32It simply makes the data bold and that might be just what you want too.
02:37Last Column here, because we don't have our data quite complete out in columns
02:41K, L and Ml that really has no obvious effect.
02:45But you want to experiment with these a little bit, and although I wouldn't
02:48suggest it's at all necessary if there is some rationale that says, you don't
02:53either like any of these, or you want to create your own New Table Style, you
02:58might want to go down that path.
03:00This probably takes a lot of work, but you can begin to see some of the
03:03capabilities here as well.
03:05So the visuals do count that makes a difference to your audience sometimes for
03:10display reasons, where you're going to be printing this, you've got a lot of
03:13control over the appearance of a Table.
03:16And if you insert a new row in the Table, as you would hope and expect,
03:20the every other row up look, the so called Banded Rows look will adjust automatically.
03:25So if we Insert a new row here, anywhere, right here, notice how all the color
03:31scheme adjusts automatically, we'll put in our data.
03:33If we change our mind on this too, we'll just get rid of it right here, then the
03:38color scheme automatically adjust that way, you don't have to worry about that.
03:42So there's some great visual features associated with using a Table and we've
03:46got a lot of choices out here using Table Styles and some others on that Design
03:50tab here, as we work with Tables.
Collapse this transcript
Expanding tables automatically and adding totals
00:00When you work with a Table you may need to add new records perhaps at the bottom of a table.
00:06You might want to add new columns to the right both of these will happen
00:10automatically you might even want to consider adding a total row.
00:14So let's take a look and see how these features work.
00:16In this particular list here I might want to add a record by inserting from
00:21within and you can usually right-click and Insert and add the data that way, if
00:25that seems appropriate, that's just fine.
00:27Excel will automatically include formulas where they exist in certain columns,
00:32so we could just fill in this data if we needed to, and then fill in this data.
00:37We don't need to worry about this formulas;
00:39that's one approach.
00:40I am going to undo that.
00:41We might want to go the bottom here and maybe I am going to start typing and
00:46look what's happening here, Smith, Marion, I'll tab over, you can begin to see
00:53based on the formatting changes, this is automatically part of the Table, and so
00:58that means if we do filtering, this row is automatically included in the
01:02filtering concept, if we do sorting, sorting is going to include all the rows
01:06down to row 743, and so on.
01:08And as we're adding new data, it just so happens, once again, we've got formulas
01:13here that are automatically copied from above.
01:16So that's fast and easy.
01:18Take a look at another worksheet, this hasn't been converted into a Table, let's do so.
01:23Once again we could do this in a variety of ways, we'll use the Format as Table
01:26option on the Home tab, pick one of these choices here, and there we go, click
01:31OK, and what happens if we want to add a new field?
01:34For example, here it's going to be called Sales Type.
01:37Column doesn't have to so wide, we'll just type in Sales Type, and as soon as I
01:43press Enter, you can see what's happening;
01:46that column automatically becomes part of the Table, because it's adjacent to the data.
01:50So we don't have to worry about expanding our Table, we don't have to take any
01:54special stuffs to do that, it becomes automatic.
01:57And based on the nature of the data, you might or might not want to have a
02:00Total row at the bottom.
02:02So on the Design tab as you're working with the table, you'll see a
02:07choice called Total row.
02:08Let me check this, and immediately we're pulled down to the bottom of the list
02:13here, you'll see the word Total.
02:15Now we might want totals for some of these columns, but not all of them.
02:19If we simply want to count the number of Sales, we could probably use any
02:22column, if each row here represents a sale.
02:25So maybe we'll do it right here and I will leave that word Total out there by itself.
02:29And then say, for example, let's just do a count here, 909 sales, we wouldn't
02:35need that for here or here.
02:37We might want to put in the average Items sold per sale, something like that,
02:43possibly the Total instead.
02:45We might want a total amount.
02:47In other words in each of these various locations, we can put in the function
02:51that serves us best.
02:54Adjust the column there, so that's the Total dollar amount.
02:58This is the average number of items per each row here.
03:02We could even put in the average Date, it probably wouldn't be a good
03:04calculation, but we've got our choices on all of these.
03:08But now the question comes up, what if you're saying yourself, well, I like to
03:11add when I add new data put it at the bottom, or let's turn off the Total row,
03:15and we'll add new data here.
03:17Make this a little bit simpler, I am just going to copy one of these and say its
03:20another repeat of this, so I'll just do a Ctrl+Drag here, start to fill in the
03:25other data, you see immediately it's part of the Table.
03:28Let's bring back a Total row;
03:30do we have to recreate all those totals all over again?
03:32No, we don't, and so if we think of the Total row as a toggle, we can easily add
03:38it and take it off as needed.
03:39So it really isn't going to get into the way of the idea that we might want to
03:43add our new information at the bottom of the list, just turn off the Total row,
03:46add the records, bring back the Total row as needed.
03:49So that's a great feature, and once again, we can see how the Table concept
03:53allows us to think of our data as an entity, and it's easy to add new columns to
03:58the right, new rows at the bottom, simply by typing the information.
04:02And then there's an added benefit of using the Total row as we need it, using
04:06the toggle concept, it's on, or it's off, whenever we need it.
Collapse this transcript
Working with formulas in tables
00:00If you worked with formulas in tables, there is a distinct advantage to the fact
00:05that Excel copies formulas down the column instantly, it's also a slight
00:09downside as we shall see.
00:11In this particular worksheet which has been converted into a table, we want to
00:15put in New Salaries in column K. And everybody in this list is going to get an
00:20increase of 2.91%, that's the value that's in cell M1.
00:25Existing salaries are in column I.
00:27So I'm going to write a formula for the very first person here.
00:31Equal and I want to click on the cell I2, it's got the salary for the first person.
00:37And when I do, what do we see?
00:39An unusual kind of construction here refers to this as a salary.
00:43And what do we want to do with this salary?
00:45We want to multiply it, there's an asterisk, times this cell M1, and as a click
00:50on M1, look what pops up on the screen.
00:53Do we've to worry about this being an absolute address, we're going to copy it
00:57down the column, no, we don't have to worry about that either.
01:00What does this formula do as of now?
01:03It's going to be calculating the salary times the percent.
01:06So if we were to press Enter, we would only have the amount of the increase.
01:10So let's add on to this the existing salary plus, and once again I'll click on I2.
01:17So that's a pretty long formula, and it may not be as clear as you want.
01:20But look what happens when I press Enter.
01:23It's entered into every single cell here, and every one of these, for example,
01:27this one or anyone, if you double- click it, you'll see what it's doing, it's
01:31consistently referring to the percent in cell M1; 2.91%.
01:35We actually see it here as well too.
01:38If you go to the very bottom, we see how far this got copied.
01:42In this list of some 741 names, it got copied all the way to the bottom.
01:48Now you might find those formulas on wieldy, they certainly don't jump out and
01:52say exactly what's going on.
01:54I'm going to press Ctrl+Z, press Ctrl+ Z again, and rewrite the formula using
02:00actual cell addresses.
02:01And although I'm not a fan of typing I think many people might prefer this
02:06approach to using formulas in tables, because it does retain the copying aspect
02:11of it that's so powerful.
02:13Equal and this time I'm going to type I2, that's the first-person in the
02:18list that has a salary.
02:20I2 times and the salary increase percent is in cell M1, let's type that.
02:27We do need to make this absolute by pressing F4;
02:31That'll take care of that.
02:32And then let's add on this the existing salary I2, and as I press Enter, again,
02:40the powerful part of this is the formula gets copied all the way down the
02:44column, so everyone of these entries here is accurate and sure enough.
02:49Press Ctrl+Down Arrow, we go all the way to the bottom.
02:52So writing formulas in tables can be very efficient and you may or may not want
02:58to go with the standard technique of clicking on the cells, or you might do as I
03:02did in the example here, type in the actual addresses.
03:05And I think for many people this latter approach is better, because it does
03:08retain that familiar look of formulas.
Collapse this transcript
3. Controlling the Creation of New Data
Building and viewing data with the Form tool
00:00When you work with large lists or if you're starting to create a list or a
00:05database on Excel, you might want to use the Form feature.
00:09Strangely if you click the Data tab in Excel, you will not see the feature
00:14called Form, and it's been in Excel for a long, long time.
00:18And maybe Microsoft is sending us some message, maybe not.
00:21But if you want to use what we call a Form and its major advantage is you can
00:27see all of the information about one record all at once.
00:31In this particular worksheet here, we need to scroll back and fourth, left
00:35and right to see this data, and maybe it's really important to focus on the
00:39data right now in row 4.
00:41And in, in other worksheets, for example, like this, maybe this is not so much
00:45of an issue, because we can see everything on the screen at once.
00:48It depends upon the nature of the data.
00:51If you want to use the Form feature, you don't have to do anything special.
00:54In fact, what you might have in, in fact, is just a few records.
00:58As long as you have a title row and at least one record, potentially you can
01:03use the Form feature.
01:04But where is it and how do we get to it?
01:07If you right-click anywhere on the Quick Access toolbar, you'll see a choice
01:12Customize Quick Access toolbar.
01:16Once here, we want to choose by clicking the drop arrow, and choose either
01:21Commands not in the Ribbon, to get a list of about 300 entries or All Commands,
01:25doesn't make any difference, either of these two.
01:28And what we're looking for in here is the word Form, and there used to be a
01:33command called Data Form in Excel 2003, and in prior versions.
01:37Here's the icon for it, click it and then Add.
01:41So we are adding the Form button to the Quick Axis toolbar, just click OK.
01:48So maybe starting with a worksheet that's got a small amount of data or maybe
01:53larger, doesn't make any difference.
01:54Let's go to this Form button and click it and here's what we see.
01:58Now we probably wouldn't need this particular feature right now, because we
02:03don't have a lot of data, although it's certainly not wrong to use it.
02:06And this is a nice way to see the information about just this one record at a time.
02:11But let's show how this might look with more data.
02:15Here's the Employees list, click anywhere in here, click the Form button again,
02:21and we see how it's looking here.
02:23Something a little different here you'll notice, is that it looks like two of
02:26the fields here, you can't make any changes too.
02:29Now we didn't say you could make changes, but we certainly can on the others.
02:34This maybe isn't the fastest way to make a change here.
02:37Maybe it turns out that Irv Fleming here really isn't in the West Building, you
02:41know, you might as well change this out in the worksheet, but we could change it
02:44here if we want to, he is really in the Taft Building.
02:46So we can make the change there.
02:48And you can see here, we can scroll it around to other records here.
02:52And as I scroll down into record 2 the Irving Fleming Building change actually
02:57took place out there in cell B2.
03:00But I'm not really making a strong case for saying this is a data entry vehicle.
03:04However, if we were to do add a new record, it would automatically calculate the
03:09month, and although it would be a little bit strange to calculate years for a
03:13New Employee, that would happen as well to.
03:15So suppose we add a new record here.
03:17I'm just going to choose New, and I won't do much typing here, but I'll just put
03:21in somebody's name, Smith, Sam, and I won't fill any other details just yet, and
03:28I'll put in the Hire Date of 10/7/11, that's all I need for now and scroll down
03:35so maybe we will close this.
03:37So what will have happened at the bottom?
03:39I'll double-click the bottom edge here, there is Sam Smith, hired on this date,
03:45and this column here, which has the anniversary month, has all ready been
03:48calculated automatically.
03:49So us this one too, but for the moment it's irrelevant, this actually calculates
03:53the number of years the person has been here.
03:55And it doesn't work so well on this one, because I actually put in -- I'm doing
03:59here a future date, so you can ignore that.
04:01Let's see what happens here with large amounts of data.
04:05This is the worksheet that's got quite a few columns in it.
04:08Let's choose the Form button here.
04:12Now this actually is the maximum number of columns we can use with this
04:16particular feature, and it's 32.
04:19And in this particular worksheet, it looks as if there are one, two, three
04:23fields for there formulas in place.
04:26And so here too, if we were to add a new record, automatically those formulas
04:30would be copied downward.
04:32The Form is really useful here, so we can focus on one item at a time, one row, row one.
04:39We can click the drop arrow at the bottom, here's record two, record three, and so on.
04:43So that's the advantage, and look what happens here, if I decide to add more data.
04:49I've got some data setup here off to the right, so I'm going to delete column AG
04:54and pull in this information, because I needed to go along with this data.
04:57So I'll simply Delete this.
05:00We now have 34 columns in this list, look what happens when I try and use Form.
05:05It just doesn't work and you'd think that maybe that it have a better
05:08error message than this.
05:09It doesn't say how many or too many, well, if it's over 32, it just won't work.
05:15So we can't put that data in here.
05:17We might want to consider getting rid of some other fields, so perhaps I'll come
05:20back and insert, and again, if we want to use this, fine, we can do this now.
05:25I think you can see how this feature works that has a distinct advantage in
05:30allowing you to see all the information about one record at a time.
05:33It has some advantages for putting in new records.
05:36One other aspect of this which isn't a strong case to be made for it, but it still works;
05:41I think the filter will do this better.
05:43But if for whatever reason, we wanted to see all of the records that met
05:48a certain criteria.
05:49For example, we want to look at all of those who have a description here of job control.
05:55So we could go to the Criteria tab here and type in under Description here Job
06:00Control, so not all of the records have that particular entry there.
06:06If we now choose Find Next, this take us to record two, next one, three, four,
06:12or may be there is a whole cluster of them there, but we're not necessarily
06:15going to stop at every single one of these.
06:18Looks like there are a lot of them there, but still, for the moment we're only
06:21looking at those that have Job Control in the Description panel.
06:25And we could have used multiple criteria as well there.
06:28Let's jump over to Employees here, and maybe using Form here we just want to
06:35view the hourly people.
06:36So we'll go to Criteria, and here we'll put in under Status, put in Hourly, and
06:44along with that maybe choose Job Rating 5.
06:47In other words, we want to see on a record by record basis, just those people
06:52who are Hourly and have a Job Rating of 5.
06:55So we'll Find Next and there's the first record, record number 77, there is
07:00Michael Mosley, and there's the next one, 87, and so on.
07:04So some advantages there perhaps, although I think a filter would work better.
07:08So the Form capability, a bit buried in Excel 2007 and 2010, nevertheless has
07:14some advantages for not only building data, but also viewing data, a record at
07:19a time.
Collapse this transcript
Restricting data entries with data validation
00:00When you're creating a list or database, a great tool to accompany that is the
00:05idea that you want your data to be accurate.
00:08In other words you would like to validate it.
00:10Keep out the bad data before it ever gets into your database and that's almost
00:15rule number one in creating data.
00:19There are some validation tools.
00:20I am going to switch to a worksheet here called Validation and its showpiece
00:25feature is what we call a pick list.
00:27So the data off to the right may not be so obvious at first as to why it's
00:31there, but let's imagine a scenario here where we are building a small list
00:36here, potentially large of Employee Names, Building, Department, Status and
00:40Salary and to make this process a lot faster, it sure would be great if
00:45nobody had to type anything for Department or Building or Status, just put in
00:50the Employee Name and the Salary and pretty much have these fall into place automatically.
00:55And even with Salary, we might want to have some controls here, maybe on the
00:59list that we are thinking are we working with an organization and your top
01:02salary is 120,000, and for a while nobody is going to go over that, and they
01:06want to make sure that all the entries fall below that value, and maybe at the
01:10same time they've got a minimum of 30,000 or whatever.
01:13We want to put controls here to make sure that no entry in this column falls
01:18outside that boundary.
01:20So let's click Column E. Many, many times when you are setting up data
01:24validation rules, if you can select the entire column, it just smoothes the
01:28process, makes it easier, rather than highlighting specific cells.
01:32On the Data tab in the ribbon, you will see a choice called Data Validation.
01:38We can allow anything here, that's the current setting, allow Any Value.
01:43For yearly salary I would imagine a Whole number probably be a sensible choice.
01:48If it does contain pennies, well, then use Decimal, use one of these two.
01:52And although, we won't be showing you other examples here, think of Date and
01:55Time and how you might have restrictions on those, or maybe sales within an
02:00organization only occur between 6 AM and 7 PM, something like that.
02:04Think of certain kinds of ID numbers where they have a limited text length,
02:10there are other kinds of restrictions you might want to consider using.
02:13So on this example, let's say we use Whole number, and immediately we see
02:17this prompt, if we have only an upper limit or only a lower limit we could
02:21use some of these choices.
02:23Let's say we use between and the Minimum in this example here 30,000 and
02:29our Maximum is 120,000.
02:32If we wish we can even provide a message in a box that will appear in the
02:37cell when we click in any of these cells in Column E. So let's provide an Input Message.
02:42Don't necessarily need a Title, but you could use a word like Reminder perhaps,
02:49putting in a colon, makes it look a little tidier and just a simple message
02:53saying, Must be between 30,000 and 120,000 and click OK.
03:08You can also provide an Error Alert too.
03:10I will show you that after this.
03:13So as we click here that should be enough to keep out not a typo necessarily,
03:17but it's a clear reminder of what's supposed to go in here.
03:20So, of course, we will put in a sensible amount.
03:25But just to see what happens when we violate the rule, there is the pop-up.
03:32Now you even can control the wording here if you wish, that's under the other
03:35tab that we saw there.
03:37For the moment here, let's say, that okay, we made a typo, Retry, we will just change that.
03:41It should have been 33 and we are all set.
03:43So, pretty basic idea and concept there to keep out the bad data.
03:49Now for Status, for Department, for Building, notice that on this worksheet off
03:53to the right are various lists of what can go in there.
03:58Now the idea behind a list is you don't want anybody typing any of these and
04:03you want these to be the only possible selections that can be made, and when
04:10you set up lists, at least initially, it's a good idea to have them on the same
04:13worksheet so you can see them and review then and make sure everything is working okay.
04:18A pop up list that we will see in these can only show eight at once, so on a
04:22Department list, we are going to have to consider the order of these, and the
04:26fact that there will be a scrollbar.
04:28Let's just do one of the smaller ones, for example, Building for Column B.
04:33In Column B, we don't want anybody typing anything, we want them to pick from a list.
04:38Data Validation>Settings>Allow>List and let's just move this dialog box over, so
04:47we can see the list.
04:48Source, click here, refer to these cells, click OK.
04:57So, and even though that's on B1, we'll ignore that.
05:00Click here, there is our list, click there, there is the next one.
05:05We are not doing any typing of course.
05:08If your hands are on the keyboard and you want to get to the list, you can press
05:10Alt+Down Arrow, then use the arrow keys, come to the one you want, press Enter.
05:15Similarly, we did the same thing with Status.
05:19Now suppose we open a new building that's in this campus like setting here.
05:22So I'm going to right-click on any one of these, except for the top one,
05:27right-click and Insert and simply shift the cells downward.
05:32So we've got a new Building.
05:34It's called the Kenton Building. Put that in there.
05:38We don't have to do anything else with our definition.
05:40Next time we click the drop arrow, that's in the list, so we can easily do that.
05:46For Department, we are definitely going to have to make the column wider and you
05:49see the list over there in Column K. And not only are we going to save a ton of
05:56time here, how long it takes to type some of these, a lot of people will
06:00misspell certain words.
06:02People will use abbreviations differently, if got different people doing this.
06:06Even you yourself might type these in differently at different times,
06:10abbreviations here and there, no periods, periods, that sort of thing.
06:14If you want a standardized list, here's where you do the standardization, and
06:18then nobody enters this differently.
06:20So that really helps too, not only the speed, but the accuracy here.
06:25One other aspect of this, this list sensibly is alphabetized.
06:30That makes good sense, because when we see the entries pop-up in Column C, we
06:34want to be able to find these quickly.
06:36But what if you know ahead of time that a large percent or a significant percent
06:42of these is likely to be used more often than others?
06:46Maybe it's Manufacturing.
06:48Let's put this at top of the list.
06:50Now you can drag this entry with the Shift key that will move it and insert.
06:55I am going to put at the top of the list, in other words I'm violating the
06:57alphabetical concept, but because this is used frequently, I don't want to have
07:02to scroll to get to it.
07:04So, in Column C, just as we did before, let's apply Data Validation rule here.
07:10Same idea, it's going to be a list. There it is.
07:13And where is that list? It's right here.
07:17Highlight the data, click OK.
07:20And as we use it, the list here, there is Manufacturing at the top of the list.
07:25We don't have to go scrolling for it, let's say, because we know we use it often.
07:29If we have to get to other choices though, they're alphabetized, so we should be
07:33able to find them relatively quickly.
07:35We did the same thing with Status.
07:37Now, it would make sense eventually to put this list somewhere else.
07:44So what if were to move this list?
07:46Why don't we take this data and put it on another worksheet?
07:49Ctrl+X possibly, that's one way to do it.
07:53Put it over here on the Sheet3, right-click, Paste.
07:58There we go, it's over there.
08:01So what happens now?
08:06Click here, drop arrow, there is the list.
08:09If you're working in older versions of Excel, you actually have to give
08:13that list a range name.
08:15You don't have to do that anymore, and so this makes it simpler and easier.
08:18Now there are lots of other examples with data validation, and I would like to
08:22refer you to another course from lynda.com on the Data Validation, both for 2007 and 2010.
08:29But there is no question;
08:30this is an appealing feature, particularly with regard to the pick list.
08:34You want to make sure that the data that goes into your worksheets is accurate,
08:38and data validation gives you a lot of tools for making that work.
Collapse this transcript
Using the data validation tools to check the validity of existing data
00:00The data validation capability in Excel is designed to work for new data, but
00:06sometimes you want to apply rules to an existing worksheet.
00:10There's a lot of data there already, but in effect you're saying, from now on I
00:15have this restriction.
00:17Let's imagine that in Column I here, I'm going to put in a restriction that
00:20says, any salary that we put in here must be over 20,000.
00:25And you can see already that there are a few entries there that don't meet that criterion.
00:29We're not going to change what's there, data validation can't do that.
00:34But data validation can show us where there are exceptions.
00:37And surely, an alternative way of doing that here would be simply to sort the data.
00:41Let's say we don't want to sort the data, we can't do that right now.
00:46Let's apply a data validation rule here in Column I that says in effect from now
00:52on, these must be Whole numbers that are greater than 20000.
01:01Okay, so that's the new rule.
01:04From now on, if I change this salary here, maybe I'll say that's going to be
01:0919,000, doesn't work.
01:13I can't sort the data right now for a couple of different reasons, and I want to
01:17know which records have violated my new rule.
01:21What can we do here?
01:22Go to Data Validation>Circle Invalid Data.
01:27
01:32There are the records that violate our rule.
01:33That's a good visual, however, there's not much you can do with it, other than to see it.
01:38I think it does point out the idea, that yes, those are the ones we need to
01:42change or at least consider, but you can find records that violate rules.
01:48And possibly you could have some scenarios where you really don't want to use
01:51the validation tool for controlling anything;
01:53you just want certain data to stand out.
01:56So apply a rule and then find out which cells violate the rule by using this feature.
02:01And if we no longer need this here, we simply go, if it's too late to do
02:05an Undo, go back to Data Validation, click the drop arrow and choose Clear
02:10Validation Circles. There we go!
02:12A great tool for locating cells that violate data validation rules.
Collapse this transcript
Conclusion
Next steps
00:00Upon completion of this course, you may want to check out additional courses
00:04available at lynda.com.
00:06For related courses, there's Cleaning Up Your Excel Data and also Managing and
00:11Analyzing Data in Excel.
00:13For a review of basic Excel functions, take a look at Excel 2010 Essentials.
00:18And if you want to become a more proficient user of this powerful software,
00:22check out the Excel 2010 Power Shortcuts course.
00:26And check back from time to time for additional courses added to this series.
00:31Thank you for watching.
Collapse this transcript


Suggested courses to watch next:

Excel 2010: Data Validation in Depth (59m 45s)
Dennis Taylor


Managing and Analyzing Data in Excel (1h 32m)
Dennis Taylor

Cleaning Up Your Excel Data (1h 26m)
Dennis Taylor


Are you sure you want to delete this bookmark?

cancel

Bookmark this Tutorial

Name

Description

{0} characters left

Tags

Separate tags with a space. Use quotes around multi-word tags. Suggested Tags:
loading
cancel

bookmark this course

{0} characters left Separate tags with a space. Use quotes around multi-word tags. Suggested Tags:
loading

Error:

go to playlists »

Create new playlist

name:
description:
save cancel

You must be a lynda.com member to watch this video.

Every course in the lynda.com library contains free videos that let you assess the quality of our tutorials before you subscribe—just click on the blue links to watch them. Become a member to access all 104,141 instructional videos.

get started learn more

If you are already an active lynda.com member, please log in to access the lynda.com library.

Get access to all lynda.com videos

You are currently signed into your admin account, which doesn't let you view lynda.com videos. For full access to the lynda.com library, log in through iplogin.lynda.com, or sign in through your organization's portal. You may also request a user account by calling 1 1 (888) 335-9632 or emailing us at cs@lynda.com.

Get access to all lynda.com videos

You are currently signed into your admin account, which doesn't let you view lynda.com videos. For full access to the lynda.com library, log in through iplogin.lynda.com, or sign in through your organization's portal. You may also request a user account by calling 1 1 (888) 335-9632 or emailing us at cs@lynda.com.

Access to lynda.com videos

Your organization has a limited access membership to the lynda.com library that allows access to only a specific, limited selection of courses.

You don't have access to this video.

You're logged in as an account administrator, but your membership is not active.

Contact a Training Solutions Advisor at 1 (888) 335-9632.

How to access this video.

If this course is one of your five classes, then your class currently isn't in session.

If you want to watch this video and it is not part of your class, upgrade your membership for unlimited access to the full library of 2,025 courses anytime, anywhere.

learn more upgrade

You can always watch the free content included in every course.

Questions? Call Customer Service at 1 1 (888) 335-9632 or email cs@lynda.com.

You don't have access to this video.

You're logged in as an account administrator, but your membership is no longer active. You can still access reports and account information.

To reactivate your account, contact a Training Solutions Advisor at 1 1 (888) 335-9632.

Need help accessing this video?

You can't access this video from your master administrator account.

Call Customer Service at 1 1 (888) 335-9632 or email cs@lynda.com for help accessing this video.

preview image of new course page

Try our new course pages

Explore our redesigned course pages, and tell us about your experience.

If you want to switch back to the old view, change your site preferences from the my account menu.

Try the new pages No, thanks

site feedback

Thanks for signing up.

We’ll send you a confirmation email shortly.


By signing up, you’ll receive about four emails per month, including

We’ll only use your email address to send you these mailings.

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.

By signing up, you’ll receive about four emails per month, including

We’ll only use your email address to send you these mailings.

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

   
submit Lightbox submit clicked