The book: files and exercises · Lesson 14 of 24

Lesson 14 exercises: sort, filter and tables

Four exercises on Excel tables, with the office supply inventory from lesson14.xlsx: the total row, a calculated column, a sort on two levels and a filter. You can type the calculated column right here, with structured references.

Lesson 14. Sorting, filtering and Excel tables

Use the Exercises sheet in lesson14.xlsx: the store's inventory, 12 items.

Files: lesson14.xlsx · solutions: lesson14-solutions.xlsx.

In the exercises with a sheet, type the formula in the fx bar and click Check: the sheet works it out the way Excel does, with commas between the arguments (semicolons work too), and also tries it with other data, to see whether it still works when the data changes. In the other exercises, you work in Excel with the lesson's file and type the result here.

At the end of the page you'll find the lesson's Bonus challenge: one more exercise, whose answer isn't in the book. You check it only here.

Exercise 1

Turn the list into a table and name it Inventory. Add the total row: how many units are there in total in the Stock column?
How many units are there in total in the Stock column?
Show the answer

Click a cell in the list, Insert > Table, OK; type Inventory in the Table Name box; check Total Row and, in the total row cell under Stock, choose Sum: 4,502 units. (Excel puts a sum under Price, the last column, on its own: that is the sum of the prices, a figure that means nothing. Open it and choose None to remove it.)

Exercise 2

Add a Value column, stock times price, as a calculated column. What formula do you see on the first row? What is the total value of the inventory?
In G4, the calculated column Value (the check copies it to G4:G15)
fx
What is the total value of the inventory?
Show the answer

Type Value in G3; in G4 =[@Stock]*[@Price]. In the total row, under Value, choose Sum: $4,809.30.

Exercise 3

Sort the table by Section from A to Z, then by Value from largest to smallest. Which item ends up at the very top? And which is the first one in the Paper section?
Which item ends up at the very top?
Which is the first item in the Paper section?
Show the answer

Top item: 3-ring binder (Equipment section, $344.00); first in the Paper section: Sticky notes ($902.00).

Exercise 4

Filter the table to keep only the items from the supplier Ramel Office Supply. How many are there, and what does the total row show in the Value column? Why isn't it the same figure as in exercise 2?
How many items are left?
What does the total row show in the Value column?
Why isn't it the same figure as in exercise 2?
Show the answer

4 items (No. 2 pencil, Black marker, Yellow highlighter, Blue ballpoint pen); total row Value = $1,466.00. The figure is different because the total row uses SUBTOTAL, which adds only the visible rows, that is, the ones left after the filter.

Bonus challenge

The answer isn't in the book: you check it only here.

The boss wants to know what the most heavily stocked items are worth: those with more than 400 units. In the Inventory table, with the Value column from exercise 2 and no other filter, apply Number Filters > Greater Than... to Stock. What does the total row show in the Value column?
Total row of the Value column
Show the answer

Open the arrow of Stock, then Number Filters > Greater Than..., type 400 and click OK. 4 items are left: Blue ballpoint pen, Sticky notes, No. 2 pencil and #10 envelope. The total row of the Value column shows $1,742.00, because it uses SUBTOTAL and adds only the visible rows. When you're done, clear the filter (Data > Sort & Filter > Clear).