Test spreadsheet elements (functions, validation, formatting)

Topic 8 – Spreadsheets (Cambridge International AS & A Level IT 9626)

Learning objective

Students will be able to test, apply and evaluate the essential spreadsheet elements – worksheet structure, referencing, functions, data validation, protection, formatting, charts, and basic data‑analysis tools – in line with the Cambridge syllabus.

1. Core spreadsheet components

  • Worksheet – a single sheet consisting of a grid of rows (1, 2, …) and columns (A, B, …).
  • Cell – the intersection of a row and a column, identified by a reference such as A1.
  • Range – a rectangular block of cells, e.g. A1:C5. Ranges can be named for easier reference.
  • Formula – an expression that begins with = and may contain operators, functions and cell references.
  • Function – a predefined calculation (e.g. SUM, IF, VLOOKUP) that can be used inside a formula.

2. Creating and editing worksheet structure

Typical actions required in the practical exam:

  • Insert / delete rows or columns (Home → Insert → Rows/Columns).
  • Hide / unhide rows or columns (right‑click → Hide/Unhide).
  • Resize rows or columns manually or with AutoFit (double‑click the border).
  • Merge cells and centre the content (Home → Merge & Center).
  • Freeze panes to keep headings visible while scrolling (View → Freeze Panes).
  • Set page layout options – orientation, paper size, margins, headers & footers (Page Layout tab).
  • Rename, colour‑code or delete worksheets (right‑click sheet tab).

3. Referencing in formulas

Reference type Notation Behaviour when copied Example
Relative A1 Both column and row change relative to the new location. =A1+B1 copied from row 2 to row 3 becomes =A2+B2.
Absolute $A$1 Column and row stay fixed. =A1*$B$2 copied down retains $B$2.
Mixed – column absolute $A1 Column fixed, row relative. =$A1*B1 copied down becomes =$A2*B2.
Mixed – row absolute A$1 Row fixed, column relative. =A$1*B1 copied right becomes =B$1*C1.

4. Core function families (exam‑relevant examples)

Only one representative is required for each family, but the table also lists additional functions that frequently appear in the assessment.

Family Function (representative) Purpose Syntax example Result example
Arithmetic SUM Adds a series of numbers. =SUM(A2:A10) Sum of the values in A2‑A10.
Statistical – single‑criterion AVERAGE Mean of a range. =AVERAGE(B2:B7) Average of the selected cells.
Statistical – conditional (single) COUNTIF Counts cells that meet one condition. =COUNTIF(C2:C20,">0") Number of positive entries in C2‑C20.
Statistical – conditional (multiple) COUNTIFS Counts cells that meet several conditions. =COUNTIFS(D2:D20,">=100",E2:E20,"<200") Rows where D≥100 and E<200.
Statistical – multi‑criteria sum SUMIFS Sum with more than one criterion. =SUMIFS(F2:F20,G2:G20,"East",H2:H20,">=50") Total of F where region is East and quantity ≥50.
Statistical – max/min with criteria MAXIFS / MINIFS Highest/lowest value that meets a condition. =MAXIFS(I2:I20,J2:J20,"<2025") Largest I‑value for years before 2025.
Logical IF Returns one value if a condition is true, another if false. =IF(E2>50,"Pass","Fail") “Pass” when E2 > 50, otherwise “Fail”.
Logical – combined AND / OR Tests multiple logical conditions. =AND(A2>0,B2<100) TRUE only if both conditions are met.
Lookup – vertical VLOOKUP Searches first column of a table and returns a value from a specified column. =VLOOKUP(F2,$A$1:$C$100,3,FALSE) Finds F2 in column A and returns the corresponding value from column C.
Lookup – horizontal HLOOKUP Searches first row of a table and returns a value from a specified row. =HLOOKUP(G2,$A$1:$Z$5,4,FALSE) Finds G2 in row 1 and returns the value from row 4.
Lookup – modern XLOOKUP (Excel 365/2021) Replaces VLOOKUP/HLOOKUP with flexible lookup. =XLOOKUP(F2,$A$2:$A$100,$C$2:$C$100,"Not found") Searches column A for F2 and returns the matching value from column C.
Text CONCATENATE (or &) Joins two or more text strings. =CONCATENATE(I2," ",J2) or =I2 & " " & J2 Combines the contents of I2 and J2 with a space.
Text – extraction LEFT / RIGHT / MID / FIND Extracts characters from a text string. =LEFT(K2,3) – first three characters. Useful for parsing codes.
Date/Time DATE Creates a date from year, month, day. =DATE(2025,12,31) 31 Dec 2025.
Date/Time – difference DATEDIF Calculates the interval between two dates. =DATEDIF(A2,B2,"D") Number of days between A2 and B2.
Error‑handling IFERROR Returns a specified value when a formula generates an error. =IFERROR(H2/0,"N/A") Shows “N/A” instead of #DIV/0!.
Math POWER / MOD / ROUND Exponentiation, remainder, rounding. =POWER(2,3) → 8; =MOD(10,3) → 1; =ROUND(L2,2) Common in financial calculations.

5. Formulas with mathematical notation

Complex calculations can be expressed with LaTeX for clarity. Example – compound interest:

$$A = P\left(1 + \frac{r}{n}\right)^{nt}$$

In a spreadsheet the same calculation is entered as:

=P*(1+r/n)^(n*t)

6. Data validation

Validation reduces entry errors by restricting the type, range or pattern of data that can be entered.

Validation type Criteria Custom formula (if used) Message shown to user
Whole number Between 1 and 100 =AND(A2>=1, A2<=100) Enter a whole number from 1 to 100.
Decimal with two places Between 0 and 1, two‑decimal precision =AND(C2>=0, C2<=1, ROUND(C2,2)=C2) Enter a value such as 0.75.
List (drop‑down) “Male”, “Female”, “Other” ={"Male","Female","Other"} Select a gender from the list.
Date Not earlier than today =A2>=TODAY() Enter today’s date or a future date.
Text length Maximum 20 characters =LEN(B2)<=20 Text must be 20 characters or fewer.
Custom – pattern (e.g., product code) Three letters followed by three digits (AAA123) =AND(LEN(D2)=6, ISNUMBER(--RIGHT(D2,3)), EXACT(LEFT(D2,3),UPPER(LEFT(D2,3)))) Enter a code in the format AAA123.

7. Cell and worksheet protection

  1. Select the cells that users must be able to edit and choose Format Cells → Protection → Unchecked “Locked”.
  2. Leave all other cells with the default “Locked”.
  3. Protect the worksheet (Review → Protect Sheet). Set a password if required and decide which actions (e.g., select unlocked cells, format cells) are allowed.
  4. To stop users from adding, moving or deleting sheets, protect the workbook (Review → Protect Workbook).

8. Cell formatting

  1. Number formats – Currency, Percentage, Scientific, Date, Time, Custom (e.g., 0.00% or "Q"0).
  2. Alignment & text wrap – Horizontal/vertical alignment, indent, wrap text, merge‑center for headings.
  3. Cell styles – Use predefined styles (Heading 1, Total, Good, Bad) for consistency.
  4. Conditional formatting
    • Home → Conditional Formatting → New Rule.
    • Rule types: “Format only cells that contain”, “Use a formula to determine which cells to format”, colour‑scale, data bars, icon sets.
    • Example: =E2>8000 → Font colour red, Bold.
    • Multiple rules can be layered; use “Stop If True” to control precedence.

9. Importing and exporting data

These operations are frequently examined in the practical paper.

Task Steps (Excel) Typical file types
Import CSV / TXT
  1. Data → Get External Data → From Text/CSV.
  2. Choose the file, click Import.
  3. In the Text Import Wizard select Delimited, choose the correct delimiter (comma, tab, semicolon), set column data formats, finish.
.csv, .txt, .tsv
Export to CSV
  1. File → Save As.
  2. Choose “CSV (Comma delimited) (*.csv)”.
  3. Confirm that only the active sheet will be saved.
.csv
Export / Save as PDF
  1. File → Export → Create PDF/XPS Document.
  2. Select the pages or sheets to include, set options, then Save.
.pdf
Import from another workbook
  1. Data → Get Data → From Workbook.
  2. Navigate to the source file, select the required sheet or named range.
.xlsx, .xls

10. Using a spreadsheet – essential operations

  • SearchCtrl + F (Find) or Ctrl + H (Replace).
  • Sort – Data → Sort; single‑column or multi‑column with custom order.
  • Filter – Home → Sort & Filter → Filter (AutoFilter) to display rows meeting criteria.
  • PivotTable – Insert → PivotTable; drag fields to Rows, Columns, Values, Filters.
  • PivotChart – With a PivotTable selected, Insert → PivotChart; choose chart type.
  • Standard chart – Insert → Charts (Bar, Column, Line, Pie, Combo, Scatter). Use the Chart Design and Format tabs to refine.
  • Data analysis tools – Data → Data Analysis (if the Analysis ToolPak is enabled) for Regression, Descriptive Statistics, etc.

11. Charts & graphs – checklist for the assessment

  1. Choose a chart type that best represents the data:
    • Bar / Column – compare categories.
    • Line – show trends over time.
    • Pie – illustrate parts of a whole (use sparingly).
    • Combo – combine column and line series (e.g., revenue + growth %).
    • Scatter – display relationship between two numeric variables.
  2. Add a clear chart title and axis titles.
  3. Set appropriate axis scaling (e.g., start at 0, use a secondary axis when units differ).
  4. Apply data labels, a legend, or a data table if required.
  5. Format series colours and line styles for readability (use high‑contrast colours).
  6. Resize the chart and position it logically on the worksheet (usually near the source data).
  7. Check that the chart updates automatically when source data changes (dynamic range or Table).

12. Testing a spreadsheet – simple test plan

Before submitting, students should verify that the workbook behaves as expected.

  • Normal data – typical values within the allowed range. Verify correct calculations, formatting and chart updates.
  • Extreme data – maximum and minimum permissible values (e.g., 0, 100 000). Confirm that validation accepts them and that formulas do not overflow.
  • Abnormal data – invalid entries such as text in numeric fields, dates outside the allowed range, or blank cells. Ensure validation messages appear and that error‑handling functions (e.g., IFERROR) prevent #REF! or #DIV/0! errors.
  • Record the expected outcome for each test case and note any discrepancies.

13. Sample assessment tasks (practical paper style)

  1. Enter the data shown in the table below and calculate the total revenue using SUM. State the exact formula used.
  2. In column F, display “High” if revenue exceeds $5 000 and “Low” otherwise. Use the IF function.
  3. Apply data validation to the “Quantity” column so that only whole numbers between 1 and 500 can be entered.
  4. Format the “Revenue” column as Currency with two decimal places. Add conditional formatting to make any value > $10 000 appear in bold red text.
  5. Write a lookup formula that retrieves the “Region” for a given “Product ID” from a separate lookup table (range $A$10:$C$20, region in column 3).
  6. Protect the worksheet so that the calculated “Revenue” column cannot be edited, but the “Quantity” column remains editable. Use a password of your choice.
  7. Create a PivotTable that shows total revenue per product name, and insert a Column Chart based on the PivotTable.
  8. Export the completed worksheet as a PDF named RevenueReport.pdf.

14. Sample data table for the tasks

Product ID Product Name Quantity Unit Price ($) Revenue ($)
P001 Alpha 120 45.00 =C2*D2
P002 Beta 85 60.00 =C3*D3
P003 Gamma 200 30.00 =C4*D4
P004 Delta 150 55.00 =C5*D5

15. Answer key (brief)

  1. Cell E6: =SUM(E2:E5)
  2. Cell F2: =IF(E2>5000,"High","Low") – copy down to F5.
  3. Data validation for C2:C5 – Settings: Whole number, between 1 and 500; Input message: “Enter a quantity (1‑500)”.
  4. Format E2:E5 as Currency (2 d.p.). Conditional formatting rule: =E2>10000 → Font colour red, Bold.
  5. Lookup formula (e.g., in G2): =VLOOKUP(A2,$A$10:$C$20,3,FALSE)
  6. Unlock cells C2:C5, lock the rest, then Review → Protect Sheet, password “exam123”.
  7. PivotTable: Rows – Product Name; Values – Sum of Revenue. Insert → Column Chart based on the PivotTable.
  8. File → Export → Create PDF/XPS Document → save as RevenueReport.pdf.

Create an account or Login to take a Quiz

39 views
0 improvement suggestions

Log in to suggest improvements to this note.