transcript

excelisfun - Create Excel Database and Data Entry Form. Excel Magic Trick 1690.

Thumbnail of the video “excelisfun - Create Excel Database and Data Entry Form. Excel Magic Trick 1690.”
Download Markdown
Community upload. AI output has not been independently verified.

Introduction

In Excel we want to enter a record into a form and have it appear in our database. Now, technically in Excel this is not a database, but for us it's a table where we can store data.

Step 1: Field Names with Format

Step one in creating a database in Excel is to create the column header names, also called field names. Very importantly, once we create them, you want to highlight them and add bold up here, or use Control+B. You always add some formatting to the column header or field names so that Excel knows that these are different than the records that we're going to enter below.

Step 2: First Record with correct Number Formatting

Now we want to enter our first record. So we type the ID, and I'm going to use Control+Enter because I want to enter that number and keep the cell selected, because we want to add the correct ID formatting to this first record. As we add new records, the formatting will automatically be copied down.

In the Home ribbon tab, Number group, we click the dialog launcher, and in the Format Cells dialog box, Number tab, we want Special. Now, we have 10 digits for the ID in our company, and if we select Social Security, it almost looks correct. What we've done by coming to Special and selecting this is that behind the scenes it wrote some code. We can change the code by going down to Custom, and we can see that zeros and dashes are all it takes to create the correct custom number formatting. We have four digits before the first dash, so we type four zeros, then dash, zero, zero, dash, and the remaining four zeros. Click OK.

That's number formatting. You can see up in the formula bar that the number is actually stored without the dashes. I'm going to use the Tab key and type the first name, Tab, type the last name, Tab. The hire date was 8/2/2019. Now, when we enter dates like this and hit Tab, a certain number formatting is added. If you want to see the full years, you can come back up to the dialog launcher for Number, and in the Date category we can select the date format we want. This looks like what we want, so we click OK.

Tab, the starting salary 69,430, Control+Enter, and now instead of using the dialog launcher we can use the drop-down, which has the most common number formattings. We'll select Currency. Tab, the phone number, and when I Control+Enter, I want to come to the dialog launcher and try to find one under Special, and sure enough there's a Phone Number. Click OK. Tab to enter the email. When I enter this email, it will automatically add a link. If you don't like that, you can right-click and come down to Remove Hyperlink. I'm going to keep it for this data set.

All we've done is enter one record, but the significance is we added all the correct number formattings, so as we add new records that number formatting will be carried down.

Step 3: Convert to an Excel Table

The way we do that is by converting this proper data set, the field names in the first row and records in subsequent rows, to an official Excel table. We can do that by selecting a single cell, it doesn't matter which cell, then Insert, and there it is: Table. You can also use the keyboard shortcut Control+T. My table has headers, which is checked, and we need that. The reason the dialog box correctly checked it is because we added bold formatting to the field names at the top. Click OK.

It adds some formatting, which you can change up here in Table Design. That's a context-sensitive ribbon; if I select outside the table it disappears, and when I click inside the table it returns. Over in Properties we definitely want to name this table object, so I'm going to call this Employee Table and enter. Once you have your Excel table, to add new records you can simply click directly below the last record, type your data, and use the Tab key. The records will automatically be added to the bottom of the table.

Step 4: Add Form button to Quick Access Toolbar

But this video is about adding an Excel form, so we want to see how to do that. We'd like to add a data entry form so we can enter data conveniently into a form, and the records will appear in the table. The problem is this is an older feature that doesn't exist anywhere in the Excel ribbon or in the Quick Access Toolbar at the top.

We want to move the Quick Access Toolbar down below the ribbon, so I come to the end, click the drop-down, and select Show Below the Ribbon. Now I want to customize this and add the Form button, so I click the drop-down and come down to More Commands, or in this case you can right-click and choose Customize Quick Access Toolbar. In both cases it opens up our Excel Options and has the correct Quick Access Toolbar selected on the left.

By default it shows a list of popular commands, and that's not what we want. In "Choose commands from," we select the drop-down and choose All Commands. We could select Commands Not in the Ribbon, but I like All Commands because then you have the power to look through the list, select an item, and add it to your Quick Access Toolbar. The one we want, I'll click somewhere in the list and type the letter F to jump to the F's, and look for Form. Sure enough, there it is. This is a beautiful feature, and I don't know why they don't have it for us in the Ribbon tab, but nevertheless we click Add. By the way, you can go through this list and select all your favorite items, add them over here, and then they're easy to access in the toolbar.

Now we click OK, and there's our Form button. Anytime we want to enter records, we simply click Form.

Step 4, part 2: Use Form to add records

Now we can click New, so we'll enter the ID and use the Tab key. The first name is Gigi, Tab, last name is Fam, Tab, the hire date. Here's a cool thing: in this dialog box, if you know the keyboard shortcut for today's date, it's Ctrl+semicolon, and it works right in this dialog box. Tab, 71,000, Tab. We enter our telephone number, Tab. Notice we're entering it without any of the formatting that'll show up later, and then the email. Now you can click New Record and instantly look: it's been added to our Excel table with all of the correct formatting. We can also, when we get to the end of a record, hit Tab, and because New is selected I can hit Enter. When I'm done, I click Close, and just like that the last record has been entered.

Summary, Closing and Video Links

So when you create a table like this, loosely called a database: field names at the top with some formatting, add the first record with the correct number formatting, then Ctrl+T to convert it to an Excel table, and then add your Form button to your Quick Access Toolbar.

If you like that video, be sure to click that thumbs up, leave a comment, and subscribe, because there's always lots more videos to come from ExcelIsFun. And if you want to learn more cool tricks about Excel, here are some cool videos.