Sub topic 3
Creating the table
This chapter assumes you have read the earlier chapters on ranges versus tables and on preparing data. You should also be comfortable selecting cells and using the Ribbon and keyboard shortcuts.
What the command does
Creating a table does not move or change your values. Excel marks the range as a table object (a ListObject), adds a style, and turns on filter buttons in the header cells. From then on it tracks the range as one unit. The unit has a name, a header row and a body of data rows.
Three ways to start
Click any single cell inside your data, then use one of these:
- Ctrl+T is the fastest. Ctrl+L does the same thing.
- Insert > Table on the Ribbon opens the same dialog.
- Home > Format as Table asks you to pick a style first, then opens the dialog.
Selecting one cell is usually enough. Excel guesses the table's extent by finding the contiguous block of data around that cell, which is the same block Ctrl+A selects. Check the guess in the dialog before you accept it.
The Create Table dialog
The dialog has two parts:
- Where is the data for your table? shows the range Excel detected, with a moving border around it on the sheet. You can edit the reference or drag a new selection.
- My table has headers tells Excel whether the first row holds column names.
If the box is unchecked, Excel inserts a new row above your data with the placeholder names Column1, Column2 and so on. Your real first row then becomes an ordinary data row. This is the most common mistake. If you see those placeholders, press Ctrl+Z and redo the command with the box checked.
Confirming the result
After you click OK, check three things:
- The header cells show filter arrows and the rows have banded shading.
- Clicking inside the data makes a Table Design tab appear on the Ribbon. It disappears when you click outside the table.
- The Name Box shows the data when you select a column and the Table Name field on the Table Design tab shows a default such as Table1.
The default name is generic. Giving it a meaningful name comes next, and you will need that name for formulas.
Common problems
| Symptom | Likely cause | Fix |
|---|---|---|
| Dialog range stops early | A blank row or column splits the data | Remove the blank line, or edit the range in the dialog |
| Headers became Column1, Column2 | Headers box was unchecked | Undo and retry with the box checked |
| Dialog range includes a title or notes row | Text directly above or beside the data | Move it away, or select the exact range first |
| Header text changed to "Sales2" | Duplicate header names | Excel appends numbers to keep names unique, so rename them |
| Header cell shows a number or date as text | Header was not text | Excel converts it to text, so check that it still reads correctly |
A quick check with a formula
Once the table exists, you can test it by typing a formula in an empty cell outside it. Name your table SalesTable first, then enter:
=ROWS(SalesTable[Amount])The result is the number of data rows, not counting the header. If you get a #REF! error, the name does not match. Check the Table Name field on the Table Design tab.
Exercise
You select one cell in a block of data, press Ctrl+T, and click OK without looking at the dialog. The first row of your data now sits below a new row labelled Column1, Column2, Column3. What went wrong, and how do you fix it?
Show answer
The "My table has headers" box was unchecked, so Excel added placeholder headers above your real header row. Press Ctrl+Z to undo, press Ctrl+T again, check "My table has headers", and click OK.