+ All Categories
Home > Documents > Week4Solutions-5_18

Week4Solutions-5_18

Date post: 27-Feb-2018
Category:
Upload: nnshgh
View: 215 times
Download: 0 times
Share this document with a friend

of 10

Transcript
  • 7/25/2019 Week4Solutions-5_18

    1/10

    Solutions for week 4 of EX101x: Data analysis to the MAX()

    Section 4.1: Introduction

    Questions

    1. NAMED RANGES?

    Select the advantage(s) of using a named range rather than a cell reference

    The correct answer is shown above. There is no speedup when using named ranges and they

    are not calculated automatically. They do make your formulas much more readable and dontrequire dollar signs to keep them referencing the same area when dragged! See the video

    again for the explanation.

    Considering the screenshot below, which range of cells do you think the named range

    "Teacher_Names" refers to?

    The correct answer here was A1:A10. The exercise was meant to get you thinking about

    where to apply named ranges and how naming them can show what data they contain.

  • 7/25/2019 Week4Solutions-5_18

    2/10

    Section 4.2: Name Manager

    Questions

    1. DOWNSIDES TO ENTIRE COLUMN(S)

    Select the downside(s) of using an entire column as a named range rather than a specific set

    of cells

    The correct answer is shown above. This tradeoff should always be considered when

    deciding whether or not to use a full column as a named range!

    Section 4.4: IntersectionQuestions

    1. TEACHERS AND DANCERS

    Assume that the green cells are the named range "DanceTypes" and the yellow cells are in

    the named range "Teachers". Considering the spreadsheet we've included in this exercise,

    what would C4 resolve to if we put =Teachers in it?

    The solution is Danil. Since Teachers is a horizontal named range, cell C4 will look in

    column C of the named range and output the value it finds there.

  • 7/25/2019 Week4Solutions-5_18

    3/10

    Section 4.5: The Basmati Effect

    Questions

    1. WHAT IS THE [THE NAME OF] YOUR FAVORITE COLUMN

    Consider the screenshot of a spreadsheet we've provided. What would be a good name for

    the named range of the cells highlighed in yellow?

    The correct answer here was Brands. Again, this question is meant to get you thinking about

    where to apply named ranges and how to name them.

  • 7/25/2019 Week4Solutions-5_18

    4/10

    Section 4.6: AssignmentThe assignment was to complete the dance studio planning. There are many ways to solve

    this but we will present one of our favorite solutions below. Weve broken up the solution into

    two parts, each with a couple steps, to make it easier to follow.

    Part 1: The Intermediary TableWe want to create an intermediary datatable that brings our data for teachers availability

    together with our data for teachers maximum levels. This will makes it much easier for us to

    find who should teach what class based on those two criteria

    Part 1, Step 1: Create New Table

    Lets start by creating a new sheet with the days of the week as columns and the teacher

    names as rows. The empty sheet is shown below. We use days of the week as columns

    rather than rows because we want this datatable to match the structure of our schedule table.

    Part 1, Step 2: Fill New Table With Max Levels

    Lets start by filling the table with maximum levels for each teacher. We can use a VLOOKUP

    that looks in the Teachers table and returns the 4th row. You can drag this formula across all

    the columns, then double click to auto-fill each column from their row 2.

  • 7/25/2019 Week4Solutions-5_18

    5/10

    Part 1, Step 3: Bringing in the Availability

    For this information to be of any use to us, we need to incorporate

    the teachers availability.

    Remember that we have a datatable that shows an X on days when a teacher is available.

    We can use an IF statement with a reference to the Availability table to check this.

    Note that weve also added a header to the teacher name column in preparation for turning

    this into a datatable.

    Part 1, Step 4: Create the Datatable

    Now were ready to turn this into a datatable to be used to fill in our schedule. To create a

    datatable, select our new data (including headers), go to the insert ribbon, and click Table.

  • 7/25/2019 Week4Solutions-5_18

    6/10

    After confirming the cells to use, you have your table! You can rename it using the design

    ribbon as shown below. Weve named ours to MaxAvail, since this table shows the availability

    of teachers maximum levels.

    Part 2: Creating the Schedule

    Now we can actually create our schedule! Below is an empty schedule. Column A shows the

    level of the class to be taught and row 1 shows which day of the week it will be taught on. We

    want to have teacher names in the cells to show who is teaching what on which day.

    Part 2, Step 1: Which Levels on Which Days?

    Lets first get the info of which level is taught on which day into our schedule sheet. We can

    use a simple VLOOKUP into the Lessons sheet for this, as shown below.

  • 7/25/2019 Week4Solutions-5_18

    7/10

    Part 2, Step 2: Show the Cells That Need Teacher Names

    Now lets use this basis to find out which cells need teachers. So we want to find the cells

    where the rows level (Column A) is in the list of levels in each cell. We can add a FIND

    function around our VLOOKUP to achieve this, as shown below.

    The above formula is for cell B2, drag it across all the columns then down on each to fill the

    table.

    Great, but now we have these ugly error cells, and we want a spot to put out datatable

    reference if there is indeed a teacher needed. We can do both of these things by wrapping

    our formula in IF and ISERROR functions.

    Now, after dragging across all rows and columns we get the table shown below.

  • 7/25/2019 Week4Solutions-5_18

    8/10

    Part 2, Step 3: Which Teacher?

    Now comes the bit where we use our awesome MaxAvail datatable from part 1. Instead of

    printing which teacher? lets put a MATCH function that will return the row number of the

    teacher that is available to teach that level for that day. This would make our formula look like

    this:

    and, when dragged to all cells, our table now looks like this.

    The #N/A outputs show that there is no teacher available to teach that level on that day.

    Were almost there! Now the last step is to wrap our MATCH function in an INDEX function.

    The index function uses the MaxAvail[Name] as its input array and our MATCH function result

    as the row number to return. The final formula and table are shown below.

    Note that you cannot drag this formula horizontally because the MaxAvail[Name] reference

    will automatically shift, which we do not want. So you need to manually copy/paste the

    formula across each column but can drag it down the rows afterwards.

    We have left the #N/A output to keep our formula from getting even longer but this should be

    fixed as well!

  • 7/25/2019 Week4Solutions-5_18

    9/10

    Section 4.6: Bonus AssignmentThis bonus assignment was more straightforward than previous ones. The goal was to fill out

    the Seller Stock sheet based on the Suppliers stock sheet. In the figures below, the table on

    the right is the Seller sheet and the table on the left is the Supplier sheet.

    Supplier Sheet:

    Sellers Sheet:

    In spirit of this weeks theme, we solved the exercise with a named range. Below this solution

    we will also show an alternative solution.

    Using Named Ranges

    If you have a keen eye, you can see that the two sheets have the the same exact IDs, which

    are conveniently sorted exactly the same way!

    Step 1: Create the Named Range

    First we need to create the named range SupplierInventory from the B column in the

    Suppliers sheet as shown below

  • 7/25/2019 Week4Solutions-5_18

    10/10

    Step 2: Fill the Sellers sheet

    Now we simply reference the named range in the other sheet and add an IF formula to fill the

    cell with the correct value as shown below. Note that this solution wont work if the sheets are

    sorted differently.

    Using VLOOKUP

    If you want to have a more robust solution that can handle the sheets being sorted differently,

    use VLOOKUP! Using the same IF formula wrapper as above, the formula below does the

    trick when dragged down the Stock column of the Sellers sheet.

    Note the odd way the apostrophe is handled in the sheet name.


Recommended