This assignment teaches students to summarize and visualize a campus utility dataset using a progression of Excel skills: basic aggregation functions (SUM, AVERAGE), conditional aggregation (SUMIF), PivotTables, native charting, and Python in Excel for DataFrame manipulation, correlation analysis, and matplotlib visualization. By the end, students should be able to cross-reference data across sheets using absolute references, build an interactive dashboard from a PivotTable, interpret Pearson correlations in an energy-management context, and produce publication-quality plots directly inside Excel using pandas and matplotlib. The assignment also reinforces worksheet hygiene — correct sheet names, correct target cells, and formula-driven (not hard-coded) outputs.
General principle: award partial credit whenever a student demonstrates understanding of the correct technique even if execution is incomplete. A correct formula in the wrong cell earns at most 50% of the task points — the technique is demonstrated but the placement instruction was not followed. A correct numeric value typed as a hard-coded constant (no formula) earns at most 40% of the task points for formula tasks (1–4) and 0% for Python tasks (7–9) where the entire learning objective is the code. For multi-step tasks (3, 5, 6, 9), award credit proportionally: if a task has four discernible sub-steps and two are correct, award approximately 50% unless the instructions specify otherwise. Never award negative points for an attempt. For Python tasks, if the code is syntactically correct and shows clear intent but fails due to a single misspelled column name, award no less than 60% of the task points and provide specific feedback on the column name error. Document all partial credit decisions with a brief note so students understand exactly what was correct and what needs improvement.
1. Click the 'Analysis' sheet tab at the bottom. 2. Click cell B2. 3. Type: =SUM(Readings!F2:F121) and press Enter. 4. Verify the result is a large positive number (total kWh across all 120 rows). The formula navigates to the Readings sheet via the sheet-prefix syntax (SheetName! followed by the cell range). F is the ElectricityKWh column; row 2 starts after the header; row 121 is the last data row (120 rows of data + 1 header row = row 121).
Award full 5 points only if a SUM formula is present in B2 on the Analysis sheet and references Readings!F2:F121 (or an equivalent full-column or named-range reference that captures exactly the 120 data rows). Award 3/5 if the formula uses SUM but references the wrong range (e.g., off-by-one rows or wrong column) yet produces a plausible number. Award 2/5 if the correct numeric value appears in B2 but was typed rather than calculated — note 'hard-coded value, no formula' in feedback. Award 0/5 if the formula is placed in the wrong cell or on the wrong sheet, even if the formula itself is correct; redirect the student to resubmit in the correct location.
If a new building were added and its readings appended to rows 122 onward, would this formula automatically include it? What change to the formula or dataset structure would make the summary self-updating?
1. Click the 'Analysis' sheet tab. 2. Click cell B3. 3. Type: =AVERAGE(Readings!J2:J121) and press Enter. 4. Confirm the result is a reasonable per-reading average cost (should be much smaller than the SUM in B2). Column J is TotalCost; the range J2:J121 covers all 120 data rows. AVERAGE sums the values and divides by the count of numeric cells automatically.
Award full 5 points if AVERAGE is used in cell B3 on the Analysis sheet referencing Readings!J2:J121 (or equivalent). Award 3/5 if the formula is in B3 but uses the wrong column yet the AVERAGE function is correctly applied. Award 2/5 for a correct hard-coded value in B3 with no formula. Award 1/5 if =SUM(...)/120 produces the correct value — the result is right but the required function was not used; leave feedback. Award 0/5 if placed in the wrong cell.
The AVERAGE here mixes readings from buildings of very different sizes. What does this number actually represent, and what might be a more meaningful measure of 'typical' monthly cost — mean, median, or a size-normalized metric?
1. On the Analysis sheet, click B8 and type 'Wells Hall', then B9 through B13 with 'Engineering', 'Library', 'Union', 'Chemistry', 'Recreation' — one per row, matching the exact case in the Readings data. 2. Click C8. 3. Type: =SUMIF(Readings!$C$2:$C$121,B8,Readings!$F$2:$F$121) and press Enter. 4. Confirm a large positive number appears. 5. Click C8 again, then copy the cell (Ctrl+C). 6. Select C9:C13 and paste (Ctrl+V) or use the fill handle and drag down to C13. 7. Click C9 and verify its formula reads =SUMIF(Readings!$C$2:$C$121,B9,Readings!$F$2:$F$121) — the Readings ranges stayed fixed, only B8 advanced to B9. 8. Spot-check: the six building totals in C8:C13 should sum to the same value as B2 from Task 1.
Award full 10 points if all six cells C8:C13 contain SUMIF formulas with correct absolute references on the Readings ranges and the building labels in B8:B13 are spelled correctly and match the data. Award 7/10 if formulas are correct in C8:C13 but one or two building labels are misspelled causing one or two cells to return 0 — deduct per incorrect label. Award 5/10 if the formula in C8 is correct but the student manually typed different totals in C9:C13 instead of copying the formula. Award 4/10 if SUMIF is used but absolute references are missing and cells C9:C13 produce wrong results due to range shift. Award 2/10 if the formula is placed in the correct cells but references the wrong column (e.g., TotalCost instead of ElectricityKWh). A correct formula placed in D8:D13 instead of C8:C13 earns no more than 5/10 — note wrong cell location.
The sum in C8:C13 should equal the total in B2 from Task 1. If they don't match, what are the possible causes? How would you use this cross-check as an auditing technique in a real finance or operations role?
1. On the Analysis sheet, click cell B16. 2. Type: =SUMIF(Readings!D2:D121,"Academic",Readings!J2:J121) and press Enter. 3. Verify the result is a positive dollar amount less than the overall SUM of TotalCost. Breakdown: Readings!D2:D121 is the BuildingType column (the range to test); "Academic" is the text criteria (quotes required inside the formula); Readings!J2:J121 is the TotalCost column (the range to sum). Note: absolute references are not strictly necessary here since the formula is not being copied, but they are harmless.
Award full 10 points if a SUMIF formula in B16 correctly references column D as the criteria range, 'Academic' as the criteria, and column J as the sum range. Award 7/10 if the formula is in B16, uses SUMIF, but references the wrong sum column (e.g., F instead of J) — the function is used correctly but the wrong data was aggregated. Award 5/10 if the correct value is typed as a hard-coded number. Award 3/10 if SUMIF is used but both the criteria range and sum range are wrong. Award 0/10 if placed in any cell other than B16 on the Analysis sheet, even if the formula is perfect.
Academic buildings make up some fraction of total cost — how would you compute the percentage, and what follow-up question would you ask leadership if academic buildings account for an unexpectedly high or low share?
1. On the Analysis sheet, click cell E2. 2. Go to the Insert ribbon tab and click PivotTable. 3. In the dialog, set the Table/Range to Readings!$A$1:$J$121. Choose 'Existing Worksheet' and set Location to Analysis!$E$2. Click OK. 4. In the PivotTable Fields pane, drag 'Building' to the Rows area. 5. Drag 'ElectricityKWh' to the Values area — it should default to Sum; if it shows Count, click the field, choose Value Field Settings, and switch to Sum. 6. Drag 'GasTherms' to the Values area and verify it is also set to Sum. 7. Confirm the PivotTable shows six building rows plus a Grand Total, with two value columns.
Award full 15 points if a PivotTable exists on the Analysis sheet starting near E2, has Building as row labels, and shows Sum of ElectricityKWh and Sum of GasTherms as two value columns. Award 10/15 if the PivotTable is correct but placed starting at a noticeably different cell (e.g., E5 or H2) — deduct for not following placement instructions. Award 8/15 if only one value field is present. Award 5/15 if the PivotTable is on the wrong sheet but otherwise correctly configured. Award 3/15 if a PivotTable exists but has Count instead of Sum for the value fields. A PivotTable cannot be graded by formula checks alone — open the file and inspect the PivotTable Fields pane manually.
PivotTables update when you click 'Refresh' after source data changes, but formulas like SUMIF in Tasks 3 and 4 update automatically. When would you prefer each approach, and what are the risks of forgetting to refresh a PivotTable?
1. On the Analysis sheet, select the PivotTable data: click the first building name cell (likely E3 or the first data row under the row labels), then extend the selection to include the building names and both value columns (ElectricityKWh and GasTherms) through the last building row, excluding the Grand Total row. 2. Go to Insert > Charts and click the Bar Chart icon (horizontal bars), then select Clustered Bar. 3. The chart appears on the Analysis sheet. 4. Right-click the chart border and choose 'Move Chart'. Select 'Object in' and choose Dashboard, or choose 'New Sheet' and rename. Alternatively, cut the chart (Ctrl+X), navigate to the Dashboard sheet, and paste (Ctrl+V). 5. On the Dashboard sheet, click the chart title and type 'Energy Consumption by Building'. 6. Resize and reposition the chart to fit neatly within the Dashboard sheet by dragging the corners.
Award full 15 points if a clustered bar chart is on the Dashboard sheet, shows both ElectricityKWh and GasTherms series, has building names as categories, and has a descriptive title. Award 10/15 if the chart is a Column chart (vertical) instead of Bar (horizontal) but is otherwise correct — the task explicitly says Bar. Award 10/15 if the chart is correctly configured but placed on the Analysis sheet instead of Dashboard. Award 8/15 if only one series is present. Award 5/15 if the chart is on Dashboard but uses random or incorrect source data. Award 2/15 if a chart exists on Dashboard but is the wrong type (e.g., pie or line) and has incorrect or missing labels. A correct chart in the wrong cell location on the Dashboard does not lose points for cell placement since the task does not specify a target cell — only sheet placement matters.
A clustered bar chart shows absolute totals. What additional chart or transformation would let you compare buildings fairly given that they have different square footages — and how does Task 9's Python chart address this limitation?
1. Navigate to the Analysis sheet and click cell A2. 2. In the formula bar, type =PY( to open Python in Excel mode (or use the Python cell button on the Formulas ribbon if available). 3. Inside the PY cell, type the following two lines: df = xl("Readings!A1:J121", headers=True) then on a new line: df[["Building", "ElectricityKWh", "GasTherms", "TotalCost"]] 4. Press Ctrl+Enter to confirm. 5. The cell should display a Python DataFrame object icon or spill the data. 6. Verify that the spilled output shows four columns: Building, ElectricityKWh, GasTherms, TotalCost with 120 data rows. Note: if the cell shows an error about the range overlapping with existing content (since B2 and B3 from Tasks 1–2 are in use), the spill will be blocked — students may need to place this differently or the instructor should confirm that A2 is the intended location given the layout.
Award full 10 points if cell A2 on the Analysis sheet contains a PY formula that uses xl() with headers=True and returns a DataFrame with the four specified columns. Award 7/10 if xl() is used correctly but the column selection is missing one of the four required columns. Award 5/10 if xl() is used without headers=True but the student works around it (e.g., skipping the first row manually) and still returns a four-column result. Award 3/10 if the code is syntactically correct but placed in the wrong cell or wrong sheet. Award 1/10 if the student writes Python syntax in a regular Excel formula bar (i.e., not in a PY cell) — the code is written but not functional. A correct value typed manually earns 0 points; this task is purely about Python in Excel.
This Python cell creates a filtered view of the Readings data. How does this compare to using Excel's native column-hiding or filtering features? In what scenarios would the Python approach be more powerful or more brittle?
1. Navigate to the Analysis sheet and click cell A25. 2. Enter Python mode (PY cell). 3. Type the following code: df = xl("Readings!A1:J121", headers=True) then r_heat = df["HeatingDegreeDays"].corr(df["GasTherms"]) then r_cool = df["CoolingDegreeDays"].corr(df["ElectricityKWh"]) then pd.DataFrame({"Comparison": ["HDD vs GasTherms", "CDD vs ElectricityKWh"], "Correlation": [r_heat, r_cool]}) 4. Press Ctrl+Enter. 5. The cell should spill a two-row DataFrame with columns 'Comparison' and 'Correlation'. 6. Verify both correlation values are between -1 and 1. A positive r_heat near 0.7–0.9 is plausible (more heating degree days → more gas use). r_cool may be moderate.
Award full 15 points if cell A25 on the Analysis sheet contains a PY formula that computes both specified Pearson correlations and returns a two-row DataFrame with 'Comparison' and 'Correlation' columns. Award 10/15 if both correlations are computed correctly but returned as two separate scalars (two cells) rather than a DataFrame. Award 8/15 if only one of the two correlations is computed correctly. Award 6/15 if the full correlation matrix is returned (df.corr()) rather than the two specific values — the information is present but the student did not extract the required pairs. Award 3/15 if the formula is in the wrong cell but otherwise correct. Award 0/15 if a hard-coded number is entered.
The Pearson correlation assumes a linear relationship. If you plotted HeatingDegreeDays vs GasTherms in a scatter chart, what patterns might suggest the relationship is non-linear, and how would that affect the validity of using r as a summary statistic here?
1. Navigate to the Dashboard sheet and click cell A2. 2. Enter Python mode (PY cell). 3. Type the code: df = xl("Readings!A1:J121", headers=True) then intensity = df.groupby("Building").apply(lambda g: g["ElectricityKWh"].sum() / g["SquareFeet"].iloc[0]).sort_values() then fig, ax = plt.subplots(figsize=(8, 5)) then ax.barh(intensity.index, intensity.values) then ax.set_xlabel("kWh per Square Foot") then ax.set_title("Electricity Intensity by Building (kWh / sq ft)") then plt.tight_layout() then fig 4. Press Ctrl+Enter. 5. The cell should render a horizontal bar chart image embedded in the Dashboard sheet. 6. Verify that six buildings appear on the y-axis, sorted from lowest to highest intensity, and that the x-axis label and title are present. Note: plt is pre-imported in Python in Excel; matplotlib does not need to be imported explicitly.
Award full 15 points if cell A2 on the Dashboard sheet contains a PY formula that loads the data, computes a per-building electricity intensity (total kWh / square footage), and returns a matplotlib horizontal bar chart with the correct title and x-axis label. Award 11/15 if the chart is correct but uses plt.bar (vertical) instead of plt.barh (horizontal). Award 10/15 if the chart is horizontal and titled correctly but the intensity calculation is wrong (e.g., row-level division then averaged). Award 8/15 if the chart is produced and placed correctly but lacks the title or the x-axis label. Award 5/15 if a chart image is produced but the underlying calculation is entirely wrong (e.g., plotting raw ElectricityKWh totals instead of intensity). Award 3/15 if the formula is in the wrong cell or wrong sheet but otherwise correct. Do not award points if the result is a DataFrame rather than a chart (the student may have forgotten to include the fig object).
The chart sorts buildings by intensity from lowest to highest. Which building appears worst, and what follow-up investigation would you recommend — is high intensity always a problem, or could building function (e.g., a 24/7 recreation facility vs a lecture hall) justify higher energy use per square foot?