Chapter 15. Advanced Spreadsheets

Lesson Files

Lessons > Lesson_15 > 15_Team_Roster.numbers

Lessons > Lesson_15 > 15_Time_Log.numbers

Lessons > Lesson_15 > 15_College_Savings.numbers

Time

This lesson takes approximately 60 minutes to complete.

Goals

Freeze a header row

Organize a table using categories and subcategories

Format a table with styles

Filter table data

Change the formatting of cells for special data types

Locate functions with the Function Browser

Replace placeholder arguments in a function

In the two previous lessons, we used tables to organize data and analyze and sort information. In this lesson, we’ll take data analysis a step further, and dive into the finer points of filtering, categorizing, summarizing, and calculating with Numbers spreadsheets. In particular, we’ll use:

  • Intelligent tables that make it easy to create categories based on your data and summarize the results.

  • Data filtering, which can help you reorganize data to display specific information.

  • Powerful formulas, which allow you to calculate a wide range of solutions. With the Function Browser, you can access over 250 functions, including special functions for engineering, statistical, and financial tasks.

Advanced Spreadsheets

Organizing Information Using Table Categories

Numbers can create useful categories based upon selected columns. In this exercise, we’ll use a roster for a youth baseball league to organize a table into several categories.

We’ll assume the coaches in the league want to know how many players are available for each position as they’re forming teams for the coming season. They also want to sort by the age of the players, so they can start recruiting now for positions where they’ll be short of players in future seasons.

Freezing a Header Row

Let’s start by opening the league roster and making it easier to read.

Your league roster has a header row across the top of the table, which of course will appear at the top of each page automatically when you print. But it’s also something you refer to constantly when organizing your information.

So we’ll begin with a handy organizational tool: freezing the header row and header column so that they remain visible while you scroll through the rest of the spreadsheet. By freezing the header row and column, you can always view and refer to those labels, no matter how deep you navigate into your spreadsheet.

  1. Open Numbers if it is not already open.

  2. Choose File > Open and navigate to the Lesson_15 folder.

  3. Select 15_Team_Roster.numbers and click Open.

    Numbers opens a spreadsheet that includes two sheets.

    Note

    Each spreadsheet in this lesson includes a second sheet showing the end result of the exercise. You can compare your own work to these final versions.

  4. Select the first sheet Table Categories, and then click on the table, League Roster.

    Note

    This table contains a roster for a youth baseball league.

  5. Scroll down the list to browse the table contents.

    As you scroll down, notice that the header row scrolls off the top of the page. It would be more useful if this row were always visible to you as you work.

    Note
  6. Choose Table > Freeze Header Rows.

    Note
  7. Scroll down the table and notice that the header row remains visible at the top of the table at all times.

Organizing Data Using Categories

You can organize a spreadsheet into categories based upon the values in a single column. For example, in the case of our league roster, you can categorize players by position. This will allow the coaches to organize new teams by viewing how many players they have for each position.

  1. Click column D (Position) to select it.

  2. Click the cell reference pop-up menu and choose Categorize by This Column.

    Organizing Data Using Categories

    Numbers organizes the data in column D into categories and creates a spreadsheet category for each unique value in the column. The column you used to create categories is the category value column.

    Note

    Be sure to remove any empty cells in column D, or they will be organized into a (blank) category.

    Note

    You can take categorizing further by using subcategories. For this table, let’s categorize using player age as a subcategory. This will help the coaches distribute players to new teams based upon both position and age, and maintain a fair balance of players on each team.

  3. Click column B (Age) to select it.

  4. Click the cell reference pop-up menu and choose Sort Ascending to sort the players by age.

  5. Click the cell reference pop-up menu and choose Categorize by This Column.

    Numbers creates subcategories for the players’ ages.

    Note

    The catchers who are 12 years of age are no longer eligible to play in this league, so you have no need to display their names in this roster. You can use categories to address this.

  6. Click the disclosure triangle in the 12 Catcher category subheader.

    Numbers hides the catchers who are 12 years old, as they will be too old to play next season.

    Tip

    If you’d like to quickly close all of the categories, click a category’s cell reference tab and choose Close All. Conversely, if all categories are closed and you want to open them, choose Expand All.

While this kind of filtering is useful, it can also be applied globally to the table, as you’ll discover in the next exercise.

Tip

In this example you categorized first by position, then by age. You can choose to change the priority of any category by clicking its cell reference pop-up menu and choosing Demote or Promote.

Filtering Data

If your table contains information that you’d like to temporarily hide, you can filter it. This hides the data from view but does not remove it from the table.

  1. In the toolbar, click Reorganize.

    Filtering Data

    The Reorganize window opens. Notice that the sort controls and the categorizing controls are in use. The middle area of the window is used for filtering.

  2. If the filtering controls are not visible in the Reorganize window, click the Filter disclosure triangle to display them.

  3. From the “Choose a column” pop-up menu, choose Age.

    Filtering Data

    Tip

    You can create new filter criteria by clicking the Add (+) button and defining each column you want to insert.

    You can now choose specific data values to display in your spreadsheet.

  4. Change the pop-up menu labeled is to is not; then type 12 in the value field and press Return.

    Tip

    Numbers filters all results to show information for only those rows that do not contain an age value of 12.

    Note

    The subcategory label for age 12 is still visible. If you want to remove any filters, click Reset in the Reorganize window.

  5. Close the Reorganize window.

    Let’s count how many players you have available for each position.

  6. Click cell D3 to select the position subcategory.

  7. Click the disclosure triangle for D3, and choose Count.

    Note

    Numbers calculates how many players of each age are available for each position.

    Tip

    Numbers can also calculate other values automatically, including subtotals and averages for each category or subcategory.

  8. Choose File > Close and save your work.

You have formatted a table to show only that information you require. Additionally, when you use categories, the information in your table becomes easier to sort and view.

Formatting a Time Report

As you’ve seen, table categories make it easier to organize and review information. In the next exercises, we’ll use categories and other advanced functions to create a time log. This report is useful for those who bill their time hourly or track time usage.

While Numbers makes your information easy to read, it can also format a table so that it is print ready. By applying table styles and formatting, you can turn a raw spreadsheet into a report that is ready to give to a client.

Let’s get started by opening the original time log.

  1. Choose File > Open and navigate to the Lesson_15 folder.

  2. Select 15_Time_Log.numbers and click Open.

    Numbers opens a spreadsheet with two sheets attached.

  3. Select the first sheet, Time Log Start.

    Formatting a Time Report

    This table contains an employee-tracking sheet. Maintaining this sheet is an easy way to track the time spent on specific tasks. Let’s clean up the table by removing empty space.

  4. Click a cell in the table to select it. Then drag the Column and Row handle up to remove empty rows. You should end up with 30 rows and 4 columns.

    Formatting a Time Report
  5. Click column C (Task); then click the cell reference pop-up menu and choose Categorize by This Column.

    Formatting a Time Report

    Numbers categorizes the data according to tasks performed. Let’s further improve the appearance of the table.

  6. In the Styles list, click Beige to reformat the table’s appearance.

    Formatting a Time Report

    Great—the table looks very professional and easy to read. Let’s now use a variable, “billable,” to total the number of hours the employee can bill his client.

Performing Calculations with Variables

In the current project, not every hour worked is billable. Some of the employee’s time was “internal,” which does not produce income but is worth tracking for future planning and analysis. Let’s calculate only the number of billable hours.

  1. Examine column A.

    Performing Calculations with Variables

    You’ll notice that it contains checkboxes for each task. This is a useful way to format a cell so that its value indicates one of two states.

    Tip

    You can quickly format a cell or an entire column to include checkboxes. Select the desired cells, and in the format bar, click the Checkbox button.

  2. Click column D to select it.

    This column contains the actual time spent. The employee typed the letter m after the number data to indicate that the value represents minutes.

    Tip

    When entering durations, you can type the full word or use the following abbreviations:

    • w—weeks

    • d—days

    • h—hours

    • m—minutes

    • s—seconds

    • ms—milliseconds

  3. Click the cell reference pop-up menu and choose Add Column After.

  4. Enter Billable Time in the header row for column E.

    Tip

    You now can calculate the number of billable hours by creating a simple formula.

  5. Click cell E3 to add a formula because this is the first row with actual data in both the Time and Billable columns.

  6. Press the = (equal sign) key to open the Formula Editor.

  7. Click cell A3, press the * (asterisk) key, and then click cell D3.

    Tip

    The formula should read =A3*D3.

  8. Press Return to apply the formula.

    Because the checkbox is selected, it is treated as a value of 1. If the Billable checkbox is deselected, it is treated as a value of 0.

  9. Click cell E3 to select it, and then drag the blue Fill handle in the lower right corner through cell E36. Numbers now shows the number of billable hours in column E.

    Tip

Referencing Data

Now that all of the billable hours are displayed, you can use that information in another table. Let’s add a second, reporting table to this sheet so that you can compare the total hours worked with the billable hours.

  1. In the toolbar, click the Tables button and choose Sums.

    Referencing Data

    A new table is added to the sheet.

  2. In the Sheets pane, double-click the table name to select it and rename the table Report.

    Let’s style this table to match the first table.

  3. Click the Beige button to apply the identical table style. Drag the table so that it is aligned with the first table.

  4. Label the first three header row cells as follows: Time, Billable Time, and Ratio.

    Let’s remove the unused column.

  5. Select column D; then click the cell reference pop-up menu and choose Delete Column.

    Referencing Data
  6. In the Report table, click cell A2. This is where the billable time will be added.

  7. Press the = (equal sign) key to open the Formula Editor.

  8. In the Billable Hours table, drag to select cells D3 through D36.

    Referencing Data

    The formula should read =SUM(Billable Hours :: D3:D36). SUM is a basic function that adds the range of selected cells. You’ll explore functions in depth later in this lesson.

  9. Press Return. The cell should display a value of 2550 minutes.

    Let’s perform a similar calculation for the next column.

  10. In the Report table, click cell B2, and then press the = (equal sign) key to open the Formula Editor.

  11. In the Billable Hours table, select cells E3 through E36.

    The formula should read =SUM(Billable Hours :: E3:E36).

  12. Press Return. The cell should display a value of 2100 minutes.

    Referencing Data
  13. Let’s remove the unused cells. Drag up the Column and Row handle for the table so that it is three rows by three columns.

    Referencing Data
  14. In the Report table, click cell C3 and press the = (equal sign) key.

  15. Enter the following formula: =B3/A3. Press Return.

    Referencing Data

    You have successfully created a new table. By formatting the Report table, you can make displayed values easier to understand.

Formatting Displayed Data

As you create formulas, you’ll often want to format the way results are displayed to make the information more clear to the reader. In the current table, it would be useful to see the total time spent displayed as hours and the ratio displayed as a percentage.

  1. In the Report table, click cell A3.

    Cell A3 is in a footer row and shows the total from the cells in this column. Let’s change the calculated totals from minutes to hours and minutes.

  2. Open the Cells inspector.

  3. From the Cell Format pop-up menu, choose Duration.

    You can use the Units control to select the units you want to display for a duration value.

  4. Drag the left end of the slider until it’s over the Hr unit.

    Formatting Displayed Data

    The time total is now displayed in hours and minutes, which is more useful to the manager and the accounting department. Let’s reuse this formula in the next column.

  5. Drag the blue Fill handle to the right so that the data in column B is displayed with the same formatting.

    Formatting Displayed Data

    All that is left is to improve the percentage display in column C.

  6. Select cell C3.

  7. In the format bar, click the Percentage button to change how the cell displays its contents.

    The number is now displayed as 82.35%.

    Formatting Displayed Data
  8. Choose File > Close and save your work.

    You have utilized several advanced features, including formatting irregular units like time, in a table.

Using Advanced Formulas with Functions

As you continue to work with formulas, you’ll use functions to perform specific tasks. (For example, you used the SUM and COUNT functions earlier in this lesson.) A function is a predefined, named operation (such as AVERAGE) that can perform a calculation. When writing a formula, you can use multiple functions or just one, depending on the task at hand.

More Info

With more than 250 functions to choose from in Numbers, you might overlook a few useful ones; not everyone who uses Numbers has formal training in accounting or statistics. To help you make the most of functions, Numbers includes a dedicated Help module. To use it, choose Help > iWork Formulas and Functions Help. It contains several example formulas and a detailed reference guide.

Let’s use a function to determine a financial goal for college savings.

  1. Choose File > Open and navigate to the Lesson_15 folder.

  2. Select 15_College_Savings.numbers and click Open.

    Numbers opens a spreadsheet with two sheets attached.

  3. Select the College Planning sheet.

    The table on the sheet outlines a target for savings. A family has determined that it wants to set aside $60,000 toward the cost of a daughter’s tuition. Let’s break down the contents of the table.

    More Info

    The family’s savings goal is $60,000, and it currently has $1,800 in the bank. (According to accounting practice, investments are shown in parentheses to represent negative numbers.) The family has 18 years toward its goal because the savings started as soon as a child was on the way. It is expected that an interest rate of 3.7% can be realized by investing the savings.

    What the family wants to determine is how much money it has to save each year to realize the college savings goal. Let’s find a function to calculate the annual investment.

  4. Click on table and select cell B6, and in the toolbar, click the Function button. Choose Show Function Browser.

    The Function Browser is a convenient way to add a function to a formula.

    More Info

    The browser is organized as follows:

    • The left pane lists categories of functions so that you can browse by the type of function.

    • The right pane lists individual functions. Click a function to select it and view information about how to use it.

    • The lower pane contains detailed information about the selected function.

  5. In the left pane, click Financial; then scroll to examine your choices in the right pane.

    The appropriate function choice is PMT, which, according to the explanatory text, returns the fixed periodic payment for an annuity based on a series of regular periodic payments of a constant amount at constant intervals with a fixed interest rate.

  6. Choose PMT and then click the Insert Function button.

    More Info

    The function is added to cell B6. Several argument placeholders are located in the function by default. To use the function in your formula, let’s replace those placeholder arguments with actual data. Move your pointer and hold it over each placeholder. Numbers will explain what type of information is needed to complete the formula.

  7. Click the periodic-rate argument.

    More Info
  8. Click cell B5 (Rate) to update the argument to use that data.

    More Info

    You’ll want to replace all the arguments with actual data.

  9. Click the num-periods argument and click cell B4 (Years).

  10. Click the present-value argument and click cell B3 (Current).

  11. Click the future-value argument and click cell B2 (Goal).

  12. The last argument is when-due. This argument is light-colored because it is an optional step that is not critical to the calculation. Click the when-due disclosure triangle and choose beginning.

    More Info

    This means the payment is due at the start of the year (and that the money would be available before the student enrolled in college).

  13. Press Return to calculate the formula.

    Numbers informs you that the family must deposit $2,185 each year to save its goal of $60,000 by the end of an 18-year period.

    More Info
  14. Choose File > Close and save your work.

    You’ve used a complex function to analyze variables and determine a correct value. Functions are very useful for a variety of tasks, and you’ll want to fully explore the Function Browser to locate other helpful functions for your typical data scenarios.

    More Info

    Be sure to check out Help > iWork Formulas and Functions User Guide for a detailed user’s manual for each function. It also offers helpful advice on the construction and use of formulas and functions.

Lesson Review

1.

How do you freeze a header row?

2.

How can you filter data automatically?

3.

How do you reference a value from one sheet to another?

4.

Define a function.

5.

In a formula, how do you insert actual data into a placeholder argument?

Answers

1.

Choose Table > Freeze Header Rows.

2.

In the toolbar, click the Reorganize button to open the Reorganize window. In the central filter area of the window, set the filtering values.

3.

In the destination sheet, select the cell in which you want to place the calculated value. Press the = (equal sign) key to open the Formula Editor. Create a formula based on cells in the source sheet. Press Return to calculate the value and place it in the destination sheet cell.

4.

A function is a predefined, named operation that can perform a calculation.

5.

In the Function Browser, choose the desired function and click Insert Function. Click the desired argument; then click the cell in which the actual data appears. Do this for every placeholder argument in the function. Press Return to accept and calculate the formula.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset