|
|
Excel Tables
[edit] Excel TablesExcel Tables came into existence with Excel 2007. They are a powerful tool that can make life a lot simpler. The main strengths of tables are:
[edit] Creating TablesData coming into a spreadsheet as a result of a query or data import will come in as a table. However, any existing range of data can be converted into a table. In this article, the following data are used
The range is converted into a table with the style selected, and filters are automatically put in place.
[edit] Adding ColumnsAdding a column is simple. In the title row adjacent to the existing table type in the new title. It will take on the characteristics of the rest of the table (color, filter, etc.). Type in the title, “Personal Sales.”
On the other hand, selecting the cells expands the selection much like selecting a cell in a Pivot Table expands the selection. So typing an equal sign and selecting cell H2 and then typing a slash and selecting cell G2 produces the following formula: =Table3[[#This Row],[Sales]]/Table3[[#This Row],[Contacts]] Both formulas do the same thing. The table syntax will be explained in more detail in a following section. This technique doesn’t work across rows, if a cell is selected in another row, it gets assigned the normal cell designation.
[edit] The Bottom LineHidden in the Table Style Options is a very powerful tool: Total Row.
Clicking on the cell produces a dropdown list of prepackaged formulas. Clicking on the More Functions option brings up the formula wizard.
For this exercise, the Sum (from the dropdown list) is selected for the Contacts and Sales Columns, and the following formula is used to calculate the company-level personal sales metric. Use the select cells method to create the formula in the formula bar. =Table3[[#Totals],[Sales]]/Table3[[#Totals],[Contacts]]
[edit] Addressing a TableThe real power of tables comes from the many ways you can address the cells. The above examples show some of these techniques.
Excel’s autofill feature is a great help in developing table formulas. The following formula shows how to compute the number of sales made by men.
[edit] Changing a Table Name or SizeNormally tables will grow and contract as you add columns or rows. However, there may be times when a manual selection is desired. Changing the table name is simple. Select a cell in the table, and in Table Tools, click on Design. At the left of the spreadsheet, is the table name box.
To change the table name, overtype the table name in the box indicated. To change the table size, click on resize table and enter the new range. [edit] Other ElementsThe elements in the table (what appears as options when a left square bracket is typed) contain the column headers and also the following elements:
[edit] Some ExamplesUsing #Data is a quick way to do VLOOKUPS.
To look up the 7th element in the total line, use We can make use of Excel’s INDEX function to do a reverse VLOOKUP.
In this example, the objective is to find the first name associated with Contract Number A0009.
[edit] Pasting Data into a TableOnce a table is set up, it is useful to supply it with new data from time to time. Ideally this would be done by invoking a query that pulls data from a database. However, sometimes copy and paste is the only alternative. This is the table whose relationships and formulas are to be kept.
The display you see (Delete Table Rows) or (Delete Entire Sheet Row) depends on whether the selection includes rows hidden by filters. If the row is hidden by a filter the Entire Sheet Row is presented. Entire Sheet Row deletion does exactly that: it deletes the entire row for all columns on the sheet. Table Row deletion deletes the row only in the table. Data in other columns on the sheet outside of the table are not affected. Once the old data is deleted, the table should look like: If you look out in the Personal Sales and Company Sales columns it appears that the formulas have disappeared. Copy and paste the alternate data into the first cell of the table. The formulas will return. The finished table should look like:
|
| This page has been accessed 1,028 times. This page was last modified 00:48, 25 August 2012 by Jack Leach. Contributions by dflak Disclaimers |