Tables and Worksheet Databases
Tables and Worksheet Databases
235
In this section, I define the terms that I use throughout this chapter.
In database terminology, the columns in a worksheet database are fields, and the rows are
records. Using this terminology, the range shown in the figure has seven fields (Name, Location,
Sex, Salary, Monthly Salary, Date Hired, and Exempt) and 20 records.
The size of a database that you develop in Excel is limited by the size of a single worksheet. In
theory, a worksheet database can have more than 16,000 fields and can consist of more than one
million records. In practice, you cannot create a database of this size because it requires an enor-
mous amount of memory, and will cause even a state-of-the-art computer to slow to a crawl.
A table example
Figure 9-2 shows the employee worksheet database after I converted it to a table, using
Insert➜Tables➜Table.
h Activating any cell in the table gives you access to a new Table Tools context tab on the
Ribbon.
h The cells contain background color and text color formatting, applied automatically by
Excel. This formatting is optional.
h Each column header contains a button that, when clicked, displays a drop-down list with
sorting and filtering options.
h If you scroll the worksheet down so that the Header row disappears, the table headers
replace the column letters in the worksheet header. In other words, you don’t need to
“freeze” the top row to keep the column labels visible.
h Tables support calculated columns. A single formula entered in a column is propagated
automatically to all cells in the column.
h You can easily add a summary row at the bottom that summarizes the columns.
h Tables support structured references. Rather than using cell references, formulas can use
table names and column headers.
h When you move your mouse pointer to the lower-right corner of the lower-right cell, you
can click and drag to extend the table’s size, either horizontally (add more columns) or
vertically (add more rows).
h Excel is able to remove duplicate rows automatically.
h Selecting rows and columns within the table is simplified.
When creating a worksheet database or table, it helps to plan the organization of your information.
See the “Designing a worksheet database or table” sidebar for guidelines to help you create tables.
Don’t worry if you later discover that your worksheet database or table needs one or more additional
columns. Excel is very flexible, and adding new columns is easy.
Table limitations
Although an Excel table offers several advantages over a normal worksheet database, the Excel
designers did impose some restrictions and limitations on tables. Among them are that
● If a worksheet contains a table, you cannot create or use custom views (View➜Workbook
Views➜Custom Views).
● A table cannot contain multicell array formulas.
● You cannot insert automatic subtotals (Data➜Outline➜Subtotal).
● You cannot share a workbook that contains a table (Review➜Changes➜Protect and Share
Workbook).
● You cannot track changes in a workbook that contains a table (Review➜Changes➜Track
Changes).
● You cannot use the Home➜Alignment➜Merge & Center command cells in a table (which
makes sense because doing so would break up the rows or columns).
If you encounter any of these limitations, just convert the table back to a worksheet database by
using Table Tools➜Design➜Tools➜Convert To Range.