Data Science Grade 10 Data Science Grade 10
Data Science Activity 3 Data Science Activity 3
Objective:
The objective of this Microsoft Excel/ OpenOffice practical is to demonstrate how to use the HLOOKUP function Objective: The objective of this Microsoft Excel/ OpenOffice practical is to demonstrate how to use the HLOOKUP
to retrieve amount of oranges sold from a horizontal lookup table based on their day out sale. function to retrieve amount of oranges sold from a horizontal lookup table based on their day out sale.
Instructions:
1. Open Excel/ OpenOffice:
• Launch Microsoft Excel/ OpenOffice on your computer.
2. Set Up the Worksheet:
• Enter the sample data into a new Microsoft Excel/ OpenOffice worksheet, replicating the table layout provided
above.
3. Identify Lookup Criteria:
• Decide on the criteria for which you want to retrieve data. In our example we show how many pieces of
Fig 1
fruits are sold per day in the first week of May. We want to find out how many oranges were sold each day of
the week.
4. Enter HLOOKUP Formula:
• First, select a cell in which you want to publish the sold amount of oranges. We start with ‘Day 1’.
Then we select the value (from row 1) we want to look up, in this case it’s ‘Orange’ in cell F1. We can insert this
value as a string: “Orange”, or as a cell reference: $F$1.
=HLOOKUP(“Orange”;B1:H8;3;0):
Explanation of the formula:
• "Orange" : Lookup value (student's name you want to find).
• B1:H8 : Range of the horizontal lookup table (excluding headers).
• 3 : Row index within the lookup table where sales are located.
Fig 2 • FALSE: Exact match parameter (ensures the fruit found exactly).
5. Execute the HLOOKUP Function:
• Press Enter after entering the formula to execute the HLOOKUP function.
6. Repeat the formula
• We can repeat this process for each formula within the formula range B12:H12.
Result:
The cell where you entered the HLOOKUP formula (e.g., cell B12) will display ‘17`, which is Orange’s sales
retrieved from the horizontal lookup table.
❏❏❏
Fig 3
White Side (Left hand side) of Page Page 3 of 3
Line side (Right hand side) of Page.