Вы находитесь на странице: 1из 5

Admin Tasks Made Easier using MS Excel

Helen Dixon

Tracking Students Progress using MS Excel


In this exercise you will use the AVERAGE function, the IF function, Nested IF
statements, the RANK function, named cell ranges, and the VLOOKUP function.

Task 1 - Getting Started


In order to complete this exercise you will need to download the students.xls file and save
it to your Homespace.
1.

Start Internet Explorer and go to the following URL:


http://www.qub.ac.uk/directorates/InformationServices/Training/FlexibleTrai
ningSolutions/

2.

Click on the students file under Admin Tasks Made Easier using MS Excel and
save it to your Homespace.

3.

Close Internet Explorer when you have finished.

4.

Start the MS Excel application and open the students workbook.

5.

Select the Module1 worksheet. The assignment and exam results for a group of
students have already been entered. To the right of the spreadsheet is a table
indicating the maximum percentage for each grade.

Task 2 - Using the Average Function


The Overall Mark for the module for each student is the average of the result for
Assignment 1, Assignment 2 and the Final Exam.
1.

Enter the following function in cell H2 to calculate the Overall Mark for the first
student:
=AVERAGE(B2, D2, F2)

2.

Press the <Enter> key to display the result.

3.

Use the Fill Handle to copy the formula into cells H3:H27 and display the Overall
Marks for the rest of the students.

Information Services 2006

Page 1 of 5

Admin Tasks Made Easier using MS Excel

Helen Dixon

Task 3 - Using the IF Function


The IF function can be used to return one value if a condition is TRUE and another value if
a condition is FALSE. The syntax of the IF function is:
=IF(logical_test, value_if_true, value_if_false)
In this example we can use an IF function to return Pass if a student has an Overall Mark of
40 or more and Fail if the student has scored less than 40.
1.

Select cell K2 and enter the following IF statement:


=IF(H2>=40, Pass, Fail)

2.

When you press the <Enter> key, the word Pass will be displayed in cell K2 as the
value in H2 is greater than or equal to 40.

3.

Use the Fill Handle to copy the function into cells K3:K27.

Task 4 - Using Nested IF Statements


Up to seven IF statements can be nested to create more elaborate evaluations. In a nested
IF statement, Excel will evaluate each condition until it finds one that is true and then it will
return the value_if_true for that statement. The last value is the value_if_false and will be
returned if none of the IF statements are true (E in this example). The following steps
will show you how to use a nested IF statement to include the grade for each students
Assignment 1 result.
1.

Select cell C2 and type the following nested IF statement:


=IF(B2>N3, A, IF(B2>N4, B, IF(B2>N5, C, IF(B2>N6, D, E))))
B2 is the cell containing the percentage for that assignment and N3, N4, N5 and N6
represent the cells where the maximum percentage for each letter grade appears,
respectively.

2.

Press the <Enter> key and the grade for Assignment 1 for the first student will be
displayed.

If you want to use AutoFill to complete the grades for the other students, you will need to
use Absolute Referencing instead of Relative Referencing for the cell references of the
cells containing the maximum percentage for each letter grade. Absolute references will
not change when a formula is copied using the Fill Handle. To make a cell reference
absolute, you need to add a dollar sign ($) to the row or column reference (or both). For
example, N$3 will prevent the row number from changing, $N3 will prevent the column
from changing and $N$3 will prevent both the row and column from changing. As we are

Information Services 2006

Page 2 of 5

Admin Tasks Made Easier using MS Excel

Helen Dixon

going to fill downwards we want to stop the row reference from changing so we need to
make it absolute. We will also copy the statement into columns E, G and I so we will need
to make the column absolute as well. Therefore, the references N3, N4, N5 and N6 must be
changed to $N$3, $N$4, $N$5, and $N$6.
Note: The cell reference for the percentage mark (B2 in the example above) must remain a
relative reference so that it will update for each student as the function is filled downwards
and copied to the other columns.
3.

Select cell C2 and adjust the nested IF statement to read as follows:


=IF(B2>$N$3, A, IF(B2>$N$4, B, IF(B2>$N$5, C, IF(B2>$N$6, D,
E))))

4.

Press the <Enter> key to replace the original statement.

5.

Use the Fill Handle to copy the formula into cells C3:C27 to display the grades for
the other students. Click in cell C27 to see how the IF statement has changed: B2
will have updated to B27 but the other references will remain unchanged.

6.

Use Copy and Paste to complete the Grade columns for Assignment 2 and Final
Exam and the Overall Grade column. Note how the reference for the cell
containing the percentage mark is updated for each column.

Note: You could replace the cell references $N$3, $N$4, $N$5, and $N$6 with their
corresponding values however using a table like the one in this example allows for greater
clarity and means that any changes to the grading scale will be automatically reflected in
the spreadsheet.

Task 5 - Using the Rank Function


The Rank function will display the position of a cell in relation to a range of cells. In this
example we can use the Rank function to display the position of each student within the
class as regards their Overall Mark. The syntax of the Rank function is as follows:
=RANK(number, reference, [order]) where number is the value or the cell whose
position you want to find, and reference is an array of, or a reference to, a list of values. If
order is zero or omitted, the list will be evaluated in descending order; if order is any
nonzero value, the list will be evaluated in ascending order.
1.

Select cell J2 and enter the following function to return the position of the first
student:
=RANK(H2, H$2:H$27)

2.

When you press the <Enter> key the function will return 1 indicating that the first
student has achieved the highest Overall Mark in the class.

Information Services 2006

Page 3 of 5

Admin Tasks Made Easier using MS Excel

Helen Dixon

3.

Use the Fill Handle to complete the rank for the remaining students.

4.

Save the students workbook.

Task 6 Naming Cells and Calculating Weighted Averages


The Final Results worksheet contains a summary of each students marks across the three
modules. Each module carries a different weight depending on its importance as shown by
the values in cells B2:D2. A weighted average takes into account the weights allocated to
the modules when calculating the average. Before calculating the weighted average, you
will need to add the data for Module1.
1.

In the Module1 worksheet, select cells H2:H27 and go to Edit/Copy.

2.

Switch to the Final Results worksheet and select cell B5.

3.

Select Paste Special from the Edit menu and click Paste Link. This means that
any changes to the Module1 worksheet will be reflected in the Final Results
worksheet.

You are now going to name the cells containing the weightings.
4.

Select cells B1:D2 in the Final Results worksheet containing the weightings and
their labels.

5.

Select Insert/Name/Create and make sure Top row is selected. Click OK.

6.

Click on cell B2. Note that the name wt1 is displayed in the Name box.

7.

Select cells B2:D2. Click in the Name box and type the name weights and press
<Enter>.

8.

Click on the down arrow to the right of the Name box and select each of the names
in turn. As each name is selected the appropriate cell or range is selected in the
worksheet.

Once you have named cells or cell ranges, the names can be used instead of references in
formulas and functions. As well as improving the readability of a formula, using named
ranges will also ensure that the reference to the weightings will remain constant when the
expression is copied, in the same way as using absolute cell references does.

Information Services 2006

Page 4 of 5

Admin Tasks Made Easier using MS Excel

Helen Dixon

9.

Select cell E5 and enter the following expression:


=(B5*wt1+C5*wt2+D5*wt3)/SUM(weights)

10.

Press <Enter> to display the weighted average for the first student.

11.

Use the Fill Handle to calculate the weighted average for all the students.

Task 7 Using a Lookup Table to Assign a Degree Class


You are now going to use the VLOOKUP function to assign a class of degree to each
student based on the weighted average. The syntax for a VLOOKUP function is:
=VLOOKUP(lookup_value, table_array, col_index_num) where
lookup_value is the value to be found in the first column of table_array,
table_array is the table in which data is looked up, and
col_index_num is the column in table_array from which the matching value must be
returned.
A table indicating the minimum weighted average required for each class has already been
created.

1.

Select cells I5:J9 and name the range deg_table.

2.

Select cell G5 and enter the following expression:


=VLOOKUP(E5, deg_table, 2)
This means look up the value in E5 and find the corresponding value in deg_table,
go to the second column and return the contents of that cell.

3.

Use the Fill Handle to copy the function and display the degree class for the other
students.

4.

Sort the records in descending order of Wt Average by clicking in any cell in the
Wt Average column and clicking the Sort Descending button

5.

Save and close the students workbook.

Information Services 2006

Page 5 of 5