Cell Manipulation

Spreadsheets
AS ICT
During this topic, you will acquire a number of skills in creating spreadsheets, writing formulae and functions and
manipulating the contents of cells.
Complete the following spreadsheet skills exercises to enable you to practice/revise all formulae and functions
listed in the syllabus.
Copy all the files into a suitably named folder in your user area before you
begin working on them.







Students
ICT & Computing
Key Stage 5
AS ICT
CIE
Practical
Spreadsheets
Mr Ashraf, 02/11/2015
1
EXERCISE 1: ADDITION, VLOOKUP, IF, SUM, AVERAGE, MAX AND MIN
1. Exercise 1: ICT Marks - Enter formulas in to the boxes shaded in yellow
=B4+C1
(Use $)
=if(G4<J1,”Fail”,”Pass”)
=D4+C4
(Make J1 absolute ($))
=SUM(G4:G9)
=AVERAGE(G4:G9)
=MAX(G4:G9)
=MIN(G4:G9)
2. Print the spreadsheet, showing formulas, orientation landscape, fit to one page, with gridlines and row and column
headings and your name in the header.
Mr Ashraf, 02/11/2015
2
EXERCISE 2: MIN, MAX, SUM, AVERAGE, COUNT, COUNTA, COUNTIF, MODE, MEDIAN, ROUND, INTEGER
1. Load Exercise 2
2. Enter suitable formulas in the cells shaded in yellow for the Marksheet and Analysis worksheets
SAMPLE FORMULAE
Use the 'Count IF' formula to count how many students achieved each of the following grade:
Count of A
=COUNTIF(C2:C21,"A")
Total (SUM)
=SUM(A1:A10)
Use the 'COUNT' function to count the number of numeric values in column D
=COUNT(A1:A10)
Use the 'COUNTA' function to count the number of text values in column C
=COUNTA(A1:A10)
Use the Round function to Round the following exam marks to 2 decimal places
=ROUND(A1,2)
Use the INTEGER function to return the following exam marks to whole numbers
=INT(A1)
Use the MODE function to return the most frequent exam marks in cells B24:B30
=MODE(A1:A10)
Use the Median function to return the median of the cells B24 :B30
=MEDIAN(A1:A10)
Work out the highest, lowest and average mark using suitable functions for the exam marks in the Marksheet
Lowest
=MIN(A1:A10)
Highest
=MAX(A1:A10)
Average
=AVERAGE(A1:A10)
Work out the total marks for the three papers using a suitable function
=SUM(A1:A10)
3. Print the spreadsheet, showing formulas, orientation landscape, fit to one page, with gridlines and row and column
headings and your name in the header.
Mr Ashraf, 02/11/2015
3
EXERCISE 3A: IF and nested IF formulas, SUMIF, COUNTIF
In this exercise, you will practice the following IF Formulas:




IF Formula
Nested IF formulas
SUMIF
COUNTIF
1. Load the spreadsheet IF, SUMIF, COUNTIF.xls
2. In cell F5, use a suitable formula to add the coursework and exam marks
3. In cell G5 use a formula to display the word Pass if the exam mark is more than or equal to the mark displayed in
cell L2 or display the word Fail if it is not.
Sample formula: =if(A5>=L3,”Pass”,”Fail”)
4. In cell H5 use a formula to display the word Pass if the coursework mark is more than or equal to the mark
displayed in cell L1 or display the word Fail if it is not.
Sample formula: =if(A5>=L6,”Pass”,”Fail”)
1. In cell I5 use the VLOOKUP function to find the overall grade from the table starting in cell L5. You must use
absolute cell reference.
2. In cell J5, enter a nested IF formula to display FAIL if the exam mark is less than the value in L2 and if the
coursework mark is less than the value in L1, otherwise display PASS.
Sample formula: =IF(D5<L2,"fail",IF(E5>=L1,"fail","pass"))
3. In Cell K5 use a nested IF function to work out the points score for each student based on their overall grade. Use
absolute cell references.
Sample formula =IF(I5=M11,F5*N11,IF(I5=M10,F5*N10,IF(I5=M9,F5*N9,IF(I5=M8,F5*N8,IF(I5=M7,F5*N7,F5*N6)))))
Mr Ashraf, 02/11/2015
4
4. In cell A29, use a suitable formula to count the number of students that achieved less than 10 marks in the exam
Sample formula: =countif(A3:A20,”<20”)
5. In cell A32, use a suitable formula to count the number of students that achieved more than 25 marks in the exam
Sample formula: =countif(A3:A20,”>45”)
6. Count the number of students except those that achieved 0 in the exam
Sample formula: =countif(A3:A20,”<>0”)
7. In cell A38, use a suitable formula to count the number of students that achieved between 25 and 50 marks in the
coursework
8. Sample formula: =COUNTIFS(D5:D26,"<50",D5:D26,">25")
9. In cell A38, use a suitable formula to add all the total marks, except those that achieved 0 in exam
Sample formula: =SUMIF(D5:D26,"<>0"F5:F26)
10. In cell A41, use a suitable formula to add all the total marks, except those that achieved 0 in coursework
Sample formula: =SUMIF(E5:E26,"<>0"F5:F26)
11. Print the spreadsheet, showing formulas, orientation landscape, fit to one page, with gridlines and row and column
headings and your name in the header.
12. Hide rows 28 to 45
13. Print out your spreadsheet in data view without rows 28-45
Mr Ashraf, 02/11/2015
5
EXERCISE 3B: Spreadsheet Skills
In this exercise, you will practice the following skills:


Custom Sort
Custom Filter
1. Open the word document named “CUSTOM SORT and FILTERING”
CUSTOM SORT
2. Add screen-prints under the following headings:



Sort by exam mark, highest to lowest
Sort by coursework mark, highest to lowest
Sort the data into descending order of Gender and then by descending order of Total marks
CUSTOM FILTER
1. Add screen-prints under the following headings:







Display the students that achieved 25 marks or above in both the exam and coursework
Display the students that achieved less than 25 marks in both the exam and coursework
Display girls that achieved less than 25 marks in exam and coursework
Display boys that achieved more than 25 marks in exam and coursework
Display students that have four letters in their surname
Display students that have a surname starting with an “M”
Display students that have a first name ending with an “E”
2. Print the document
Make sure that you can Search:



Text columns
Numeric columns
date, time columns
by using:





Contains
starts with
ends with
Boolean operators (AND, OR, NOT)
., ,, =, .=, ,=
Mr Ashraf, 02/11/2015
6
EXERCISE 4: Cell Manipulation
Open the spreadsheet “Cell Manipulation”

Concatenate cells (combine the contents of two cells)/Join Strings
In cell E2, join the contents of the cells that contain the forename and surname
Sample Formula= B6&" "&C62

Transpose cells
Paste the record of the first student into a vertical table in sheet 2 using the transpose facility
1. Copy the cells
2. Go to sheet 2
3. Right click and click paste special, transpose cells

Split strings/Extract from strings (substring, left, right, mid, length)
In cell A2, extract the first three letters of the student’s surname and join them with the last two numbers from the date of
birth
Sample Formula=LEFT(F2,5)& RIGHT(H3,7)
In cell B2, use the MID function to extract the first five letters from the surname and join them with the length of the
surname
Sample Formula =MID(C2,1,4)&LEN(C2)

Convert string values to numeric values
1. Highlight the cells H2:H21
2. Right click and set them to numbers

Protect cell(s)/Protect rows/columns
Protect cells C2:D21 only
Mr Ashraf, 02/11/2015
7
1.
2.
3.
4.
Highlight the ALL the cells and right click and go to format cells, click on protection and untick locked
Highlight cells C2:D21
Repeat step 1 but this time tick locked
Click on Protect Sheet
Print the spreadsheet, showing formulas, orientation landscape, fit to one page, with gridlines and row and column
headings and your name in the header.
Extracting numeric values from strings
Mr Ashraf, 02/11/2015
8
EXERCISE 5: HLOOKUP
Open the spreadsheet “HLOOKUP”
HLOOKUP, Naming a Range of Cells
1.
2.
3.
4.
5.
Open the spreadsheet called “HLookup”
Highlight the three rows from the table
Right click and select Define Name
Create a named range called “Orders”
In cell B7, enter a HLookup formula to obtain the Unit price for order 32548
Sample Formula =HLOOKUP(B7,B1:G3,2)
Manipulating Date/Time Values





In Cell J1, use a formula to enter today’s date
In Cell J2, use a formula to enter today’s date’s date and time
In cell J3, use a formula to extract the month from the date entered in cell J1
In cell J4, use a formula to extract the month from the date entered in cell J1
In cell J5, use a formula to extract the month from the date entered in cell J1
=Today()
=Now()
=Month(J1)
=Day(J1)
=Year(J1)
I can adjust the page layout








Set the page size to A4
Set the page orientation to landscape
Set it to fit to a page
Set the page margins (top margin, bottom margin, left margin, right margin) all to 0.5cm
display row/column headings
Give the spreadsheet a suitable title and add this to the header
Add your name to the footer
Add automated text such as page numbering, file path and file name to the footer
Mr Ashraf, 02/11/2015
9
I can format rows, columns and/or cells




Format cells containing unit price to currency (Pounds, 2 decimal places)
Set the date in cell J1 to long date
Set the time in J2 to 24 hour clock
Set the text orientation in the table headings to
o Horizontal = center
o Vertical = center
o Text wrap

conditional formatting, set the following rules for qty:
o between 1 and 10 to red
o between 11 and 40 to orange
o between 41 and 100 to green
I can enhance/emphasise cells








Shade the column headings
Set the text orientation to 90 degrees
Set the column headings to Bold, Underscore, Italics
Apply Borders to the table and add a thick black border around the table
Insert a row above the table and add the title “Orders”
Merge cells A1 to A4
Apply a suitable font styles (font face, point size) to the title
Add a suitable instruction comments to a cell A7
Validation


Restrict the values in the Qty cells so that the quantity entered can only be within the range 0 and 100. Add suitable
text for the user. Take a screenshot of the validation to see if it works.
Test the validation applied to the spreadsheet using a testing table:
Test Data
Type
Normal
Expected Outcome
Actual Outcome
Abnormal
Extreme
Mr Ashraf, 02/11/2015
10
I can manipulate window(s)





Freeze column A
Zoom in and check whether column A stays frozen whilst you look at the data in the other columns
unfreeze column A
Use the split window tool
Restore the windows
14. Print the spreadsheet, showing formulas, orientation landscape, fit to one page, with gridlines and row and column
headings and your name in the header.
Mr Ashraf, 02/11/2015
11