Tables in Excel

Insert a Table  |  Sort a Table  |  Filter a Table  |  Total Row

Tables allow you to analyze your data in Excel quickly and easily. Learn how to insert, sort and filter a table, and how to display a total row at the end of a table.

Insert a Table

To insert a table, execute the following steps.

1. Click any single cell inside the data set.

2. On the Insert tab, in the Tables group, click Table.

3. Excel automatically selects the data for you. Check ‘My table has headers’ and click on OK.

Result. Excel creates a nicely formatted table for you. This may still seem like a normal data range to you but many powerful features are now just a click of a button away.

Sort a Table

To sort by Last Name first and Sales second, execute the following steps.

1. Click the arrow next to Sales and click Sort Smallest to Largest.

2. Click the arrow next to Last Name and click Sort A to Z.

Result.

Filter a Table

To filter a table, execute the following steps.

1. Click the arrow next to Country and only check USA.

Result.

Total Row

To display a total row at the end of the table, execute the following steps.

1. First, select a cell inside the table. Next, on the Design tab, in the Table Style Options group, check Total Row.

Result.

2. Click any cell in the last row to calculate the Total (Average, Count, Max, Min, Sum etc.) of a column. For example, calculate the sum of the Sales column.

Note: in the formula bar see how Excel uses the SUBTOTAL function to calculate the sum. 109 is the argument for Sum if you use the SUBTOTAL function. Excel uses this function (and not the standard SUM function) to correctly calculate table totals of filtered tables.

Structured References in Excel

When working with tables in Excel, you can use structured references to make your formulas easier to understand.

For example, we have the following table.

1. Select cell E1, type Bonus, and press Enter. Excel automatically formats the column for you.

2. Select cell E2 and type =0.02*[

3. A list of structured references (the columns) appears. Select Sales from the list.

4. Close with a square bracket and press Enter.

Result. Excel automatically copies the formula down the column for you.

Note: click AutoCorrect Options and click Undo Calculated Column to only insert the formula into cell E2.

To refer to this table in a formula, execute the following steps.

5. First, select a cell inside the table. Next, on the Design tab, in the Properties group, we can see that Table1 is the name of this table.

6. Select cell E18 and enter the formula shown below.

Explanation: this formula calculates the sum of the Sales column. Enter =SUM(Table1[ and Excel will give you a list of structured references you can use. This formula updates automatically when you add or delete records.

Table Styles in Excel

Quickly format a range of cells by choosing a table style. You can also create your own table style. Quickly format a cell by choosing a cell style.

1. Click any single cell inside the data set.

2. On the Home tab, in the Styles group, click Format as Table.

3. Choose a table style.

Note: click New Table Style to create your own table style or right click a table style and click Duplicate to create a new table style that is similar to an existing one. Modifying a custom table style affects all tables in a workbook that use that table style. This can save a lot of time.

4. Excel automatically selects the data for you. Check ‘My table has headers’ and click on OK.

Result. This is another way to insert a table.

To convert this table back to a normal range of cells (and keep the formatting), execute the following steps.

5. First, select a cell inside the table. Next, on the Design tab, in the Tools group, click Convert to Range.

Result. A nicely formatted range of cells.

Note: to remove the table style, select the range of cells, on the Home tab, in the Styles group, click Normal.

Leave a Reply

Your email address will not be published.