AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Year plan · Computing

Search and use data

Week 17 · Unit 7: Be a data architect · 3 lessons
2

Narrow it with a phrase

Computing 6: Unit 7, pp. 92–105
GoalNarrow a search by using a phrase of several words and predict how many results it gives.
New words
phrase · two or more words searched together, in the same ordernarrow · to make a search give fewer, more exact resultsresult · a cell or record that the search findsexact · exactly the same, with the same letters, spaces and order
Explanation

A single keyword often finds too much. A phrase of two or more words finds only the cells that contain all of those words, together and in that order. This narrows the search. In the recipe sheet, soup matches four recipes, tomato matches three, and the phrase tomato soup matches only two. The spelling and spaces of a phrase must be exact. If the phrase has a spelling mistake or an extra space, it will not match the cell. We can predict the results by reading the list before we search, and then compare our prediction with what the spreadsheet finds. Numbers are searched in the same way as words.

ABC
1RecipeMinutesServes
2Tomato soup304
3Lentil soup406
4Tomato salad102
5Creamy tomato soup354
6Pumpkin soup454
7Fruit salad155
Worked examples
SearchCells foundWhy
soupA2, A3, A5, A6four recipes have the word soup
tomatoA2, A4, A5three recipes have tomato
tomato soupA2, A5only these two have both words, in this order
soup tomatononethe words are in the wrong order
Here are the searches on the recipe sheet. A phrase finds fewer cells than either of its words alone.
Searching for the number 4 in the Minutes and Serves columns finds cells that have a 4 anywhere in the number: B3 (40), B6 (45), C2, C5 and C6 (the serves of 4). It finds 5 cells. A number search also matches the digits inside bigger numbers.
Aisha types tomatoe soup, with an extra e, and the sheet finds nothing. The phrase is not exact. She corrects the spelling to tomato soup and the search finds A2 and A5.
Class activity

Narrowing game (no computer): write twenty menu items on cards, such as ‘red apple’, ‘green apple’, ‘apple pie’ and ‘orange juice’. An adult says a keyword, and you put the matching cards in a pile and count them. Then the adult says a phrase that contains the keyword. Take away the cards that do not match. Is the new pile smaller or the same size? Try three keywords and three phrases and fill in a table with the counts. If you have a computer or tablet, do the same in a spreadsheet with the Find tool.

Practice
1
Use the postcard sheet. Which cells match (a) the keyword bridge, (b) the phrase old bridge, (c) the phrase bridge at night?
A
1Postcard
2Old bridge
3Old castle
4New bridge
5Bridge at night
6Castle at night
7Old bridge at night
2
Chen types the phrase lentl soup and nothing is found, but the recipe is in the sheet. What is wrong, and how does he fix it?
3
How many cells match (a) red, (b) scarf, (c) red scarf?
A
1Clothes
2Red scarf
3Blue scarf
4Red hat
5Red scarf (wool)
6Green hat
4
Why can a longer phrase give fewer results than a single keyword, but never more?