Page123456
TECH CLUBBOZOMA INNOVATION HUB
Session 22 β€’ Page 1
Learner Full Name:
School:
Assigned Workstation:
Class:

Session 22: Spreadsheets 3: Working with Data

In Sessions 19 and 20 you typed numbers, wrote formulas, used SUM, AVERAGE, MAX and MIN, and drew a chart. In Session 21 your class answered a survey. Now you have a sheet full of real answers, called data. Today you learn to ask it questions: Who has the longest journey? How many of us walk? What food wins? Then you will tell the class what you found, in one clear sentence and one clear chart.

1. Plain Talk: Morning Assembly

Think of your whole school at morning assembly. The head teacher can do four clever things with all those pupils, and a spreadsheet can do exactly the same four things with rows of data:

SORT "Line up from the shortest to the tallest." Puts rows in order FILTER "Only JHS 2, step forward." (The rest stay.) Shows only some rows COUNTIF βœ‹ 12 "Hands up if you walked to school today." Counts matching rows IF 50+? ← yes no β†’ "50 or more, go left. Others, go right." Labels each row
Figure 22.1: Sort, filter, count and decide: four assembly commands that work on spreadsheet rows too.
πŸ’‘ ONE ROW = ONE PERSON
In a survey sheet, every row is one person's answers and every column is one question. Row 1 holds the column names (the header row). Keep that picture in your head all lesson: it is the secret to not making the classic mistake on the next page.
Freeze the Header & Sort Safely
Session 22 β€’ Page 2

1. Our Data

Here are the first rows of the class survey file (Class_Survey). It has 20 rows of answers, from row 2 down to row 21.

ABCDEFG
1No.ClassTravelMinutesFoodScreen hoursEnjoy (1–5)
21JHS 1Walk15Jollof25
32JHS 2Trotro or bus40Waakye44
43JHS 1Walk10Banku15
……and 17 more rows, down to row 21.

2. Freeze the Header Row

When you scroll down a long sheet, row 1 disappears and you forget which column is which. Freezing pins it to the top. In Excel: View → Freeze Panes → Freeze Top Row. Scroll down: the header stays!

Google Sheets: View → Freeze → 1 row. LibreOffice Calc: View → Freeze Cells → Freeze First Row.

3. Sort Without Breaking the Rows

Sorting puts the rows in order: A to Z (or Z to A) for words, smallest to largest (or largest to smallest) for numbers. But sorting has one famous trap:

BEFORE NameTravelMins AmaWalk15 KofiTrotro55 EsiTaxi30 ✘ SORTED ONLY "MINS" NameTravelMins AmaWalk55 KofiTrotro30 EsiTaxi15 Now Ama "walks for 55 minutes". The rows are broken: the data is wrong! βœ” SORTED WHOLE ROWS NameTravelMins KofiTrotro55 EsiTaxi30 AmaWalk15 Each person moved with all their answers. Never select just one column before you sort. Click ONE cell, and let the whole row travel.
Figure 22.2: The classic sorting mistake. Sorting one column on its own mixes up everybody's answers.
1
Click one cell in the column you want to sort by, for example D5 (Minutes). Do not click the column letter.
2
Data → Sort Largest to Smallest (for words: Sort A to Z). Excel sorts the whole table and keeps row 1 at the top. If a Sort Warning box appears, choose Expand the selection.

Google Sheets: freeze row 1 first, then Data → Sort sheet → Z to A. LibreOffice: Data → Sort Descending. Made a mess? Ctrl + Z straight away!

Filter & Count: COUNTIF
Session 22 β€’ Page 3

1. Filter: Show Only the Rows You Want

A filter hides the rows you don't want to see right now, like asking only JHS 2 to step forward. Nothing is deleted: clear the filter and every row comes back.

No. Class Travel Minutes Sort A to Z (Select All) Bicycle Car Taxi Trotro or bus βœ” 1. Click inside the data → Data → Filter. Little arrows appear in the header row. 2. Click the arrow on Travel. Untick (Select All), tick only "Trotro or bus", OK. 3. Read the result. The row numbers turn blue and some are missing: those rows are hidden, not gone. 4. Data → Clear brings every row back.
Figure 22.3: Filtering the Travel column in Excel (Google Sheets: Data → Create a filter, and Data → Remove filter to bring the rows back. LibreOffice: Data → AutoFilter).

2. COUNTIF: Count Only the Matching Cells

You met =SUM and =AVERAGE in Session 20. COUNTIF counts how many cells in a range match a rule. It has two parts inside the brackets, separated by a comma:

=COUNTIF(C2:C21, "Walk")
WHERE TO LOOK: the range

C2:C21 means "the Travel answers, C2 through to C21". Leave out row 1, the header.

WHAT TO COUNT: the rule

"Walk" in quotation marks for words, spelt exactly like the cells. For numbers: 5, or ">4" for "more than 4".

3. Your Turn: Be the Computer

Cells E2 to E7 contain: Jollof, Waakye, Jollof, Fufu, Jollof, Waakye. What does each formula show?

FormulaResult
=COUNTIF(E2:E7,"Jollof")
=COUNTIF(E2:E7,"Waakye")
=COUNTIF(E2:E7,"Kenkey")
IF, Highlights, Charts & Findings
Session 22 β€’ Page 4

1. The IF Function: Let the Sheet Decide

IF checks a test for every row and writes one answer when the test is true and a different answer when it is false. Imagine a teacher marking a test: "If the score is 50 or more, write Pass; if not, write Try again."

=IF(B2>=50, "Pass", "Try again")
Score in B2 e.g. 72 1. TEST B2>=50 ? TRUE 2. "Pass" FALSE 3. "Try again"
Figure 22.4: The three parts of IF: the test, the answer if true, the answer if false. Words go in "quotation marks".

Your turn: what does =IF(B2>=50,"Pass","Try again") show when B2 is…

72
50
49
35

2. Conditional Formatting: Make Important Cells Glow

Conditional formatting colours cells automatically when they match a rule, like a highlighter that reads. Select F2:F21 (screen hours) → Home → Conditional Formatting → Highlight Cells Rules → Greater Than → type 4 → OK. Every value over 4 turns light red, and the colour updates if a number changes. Google Sheets: Format → Conditional formatting. LibreOffice: Format → Conditional → Condition.

3. From Numbers to a Clear Finding

Make your chart from your small COUNTIF summary table (the labels and the counts), not from the 20 raw rows. Remember Session 20: select the labels and the numbers, give the chart a title that says what it shows, and leave out any total. Then write a finding: one sentence that states a fact from the data, with a number.

βœ” GOOD FINDINGS

"Half of our class (10 of 20) walk to school."
"Every pupil who comes by trotro or bus takes 40 minutes or more."

✘ NOT FINDINGS

"Pupils love walking." (The data didn't ask that.)
"Trotros are bad." (An opinion, with no number.)

Guided Hands-On Lab: Our Class in Numbers
Session 22 β€’ Page 5

1. Lab Mission: Analyse the Class Survey

Warm up in the Data Sorter 3D lab on your session page: sort and filter a table of survey answers and use IF to label each row, while the 3D columns rearrange themselves. Then open Class_Survey from Documents > BIH_Practice (your class's Session 21 answers, or the sample your mentor gives you) and save a copy as Class_Survey_YourName.

1
Freeze and sort: freeze the top row. Click a cell in D (Minutes) → Sort Largest to Smallest. Check that each row still makes sense, then record the top row below. Now sort by Class, A to Z.
2
Filter: Data → Filter. On Travel, show only Trotro or bus. How many rows are left? Look at their minutes. Then clear the filter.
3
IF: in H1 type Trip. In H2 type =IF(D2>=30,"Long trip","Short trip"), press Enter, then drag the AutoFill handle down to H21.
4
COUNTIF summary: leave column I empty. In J1 type Travel and in K1 Pupils. In J2 to J6 type Walk, Trotro or bus, Taxi, Bicycle, Car. In K2 type =COUNTIF(C2:C21,"Walk"), and so on for each one. In J8 type Long trips and in K8 =COUNTIF(H2:H21,"Long trip").
5
Highlight, chart, save: highlight screen hours greater than 4 (page 4). Select J1:K6 → Insert → Column chart. Title: How Our Class Travels to School. Save with Ctrl + S.
QuestionMy result
Longest journey: which row is on top? (Class, travel, minutes, food)
How many rows show after filtering for Trotro or bus?
COUNTIF results: Walk / Trotro or bus / Taxi / Bicycle / Car
How many long trips? How many cells glow for screen time?

My three findings (one sentence each, with a number). Share your best one with the class!

Session 22 Review & Verification
Session 22 β€’ Page 6

1. What Should You Do?

A. Yaw wants the survey rows in order of minutes. What should he do?

Click the letter D to select the whole column, then sort only that column.
Click one cell in column D, then Data → Sort, so whole rows move together.
Retype the table in the right order.

B. Akosua filtered the sheet to show only JHS 3. Now she thinks the other rows were deleted. What is true?

They are gone for ever; she must undo.
They are only hidden; clearing the filter brings them back.
They moved to a new sheet.

C. Which formula counts how many pupils chose Waakye in E2:E21?

=SUM(E2:E21,"Waakye")
=COUNTIF(E2:E21,"Waakye")
=COUNTIF(Waakye)

D. Which is a good finding?

"7 of the 20 pupils chose jollof, more than any other food."
"Jollof is the best food in Ghana."
"Some people like food."

2. Written Review Questions

Question 1: Write an IF formula for cell H2 that shows "Too much" when the screen hours in F2 are more than 4, and "OK" when they are not.

Question 2: Why should you leave an empty column between your data and your COUNTIF summary table?

3. Self-Assessment & Mentor Sign-Off

Tick the column that reflects your confidence at the end of Session 22:

Working with Data Competency With Help Almost Alone All By Myself!
1. I can freeze the header row and sort data without breaking the rows.
2. I can filter data and count answers with COUNTIF.
3. I can write an IF formula and use conditional formatting.
4. I can make a clear chart of survey results and write a one-sentence finding.
Mentor Signature: _____________________________
Date Completed: ____________________

BIH JHS Tech Club Β· a Bozoma Innovation Hub programme Β· Your answers are saved only on this computer.