You are on page 1of 9

ECH 26: (Structured)

Tables
Book: Microsoft Excel 2016 Data Analysis and Business Modeling
Turning Data into Table
 File: tabletemplate.xlsx
 Task: Turn the data into an Excel table, name the table
MyTable, and sort the data by name in ascending order.
Insert | Tables (Table)

Dr. K. Chen, 2015 2


More about Excel Tables
 As with named ranges, Tables are also named objects that
can be accessed from Formulas | Defined Names (Name
Manager).
 Columns and Rows can be added to the table.
 Will is added to the table below.
 Q: Do you think the newly added record is part of the table?

Dr. K. Chen, 2015 3


Total Row
 Design | Table Style Options (Total Row)

Dr. K. Chen, 2015 4


Accessing Table Elements

 Table elements (rows, cols, and cells) can be accessed by using


the table name and a set of “specifiers”. This is called a
structured reference.

 Examples
 =COUNTA(MyTable[Name])  Count entries in the Name column
 =SUM(MyTable[Units])  Total number of units in the Units column
 =COUNTA(MyTable[#All])  Entire content of the table

Dr. K. Chen, 2015 5


Adding Calculated Columns

 =[@Revenue] / [@Units]
 @ sign refers to the current row
 [@Revenue] refers to the value under the Revenue column in the
current row.
 [@Units] refers to the value under the Units column in the current
row.

 Note that you did [@Revenue] inside the table. Does it


work if you do it outside?
Dr. K. Chen, 2015 6
 =COUNTIF(MyTable[Units], "> 700")
 Count the Sales Reps who made at least 700 units of sales.

Q:Count the Sales Reps who sold at least 700 of units and
made at least $30000.

 Q: Calculate the average revenue for those sales reps who


made at least $20000 revenue.

Dr. K. Chen, 2015 7


Advanced Uses

 =MyTable[[#Totals],[Units]]
 The cell at the Total Row under the Units column.
 Its value depends on what the Total Row shows.
 If the Total Row shows AVERAGE, then this number is the average units.
 =MyTable [[#Data],[Units]]
 The whole data portion of the Units column
 =MyTable[[Units]:[Unit Price]]
 All cells between Units and Unit Price columns, not counting the cells in
the Total Row.

Dr. K. Chen, 2015 8


Further Reading

 See Using structured references with Excel tables at


Office.com

Dr. K. Chen, 2015 9

You might also like