0% found this document useful (0 votes)
11 views46 pages

COMP 102 2025 - Lecture Six

The document outlines the COMP 102 course on advanced Excel functions, taught by Dr. Malatsi Galani, including essential topics such as function syntax, mathematical functions, and data analysis using charts and graphs. It also includes practical examples, function categories, and common errors associated with Excel functions. Students are encouraged to ask questions during the course and will engage in lab practicals starting from the second week.

Uploaded by

theotjituaiza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views46 pages

COMP 102 2025 - Lecture Six

The document outlines the COMP 102 course on advanced Excel functions, taught by Dr. Malatsi Galani, including essential topics such as function syntax, mathematical functions, and data analysis using charts and graphs. It also includes practical examples, function categories, and common errors associated with Excel functions. Students are encouraged to ask questions during the course and will engage in lab practicals starting from the second week.

Uploaded by

theotjituaiza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 46

COMP 102

COMPUTER SKILLS FUNDAMENTALS II


Dr. Malatsi GALANI
DEPARTMENT OF BIOMETRY AND MATHEMATICS

General Information
 Lecturer: Malatsi GALANI
[[email protected]]
 Online Resource: COMP 102 via EDUHUB
[Moodle]
 Lab Practical: Starts 2nd Week
 Please interrupt with questions at any time
Problem-Solving Concepts and Principles
in MS Excel – Advanced Functions
Lecture Outline
1. What are functions
2. Simple Syntax of Commonly
Used Functions
3. Different charts and Graphs
4. Uses of charts and Graphs
to analyse data
RECAP
1. There is a formula =A1+B1 in cell C1, and cells A1 and B1 contain numbers 2 and 3
respectively. What will be the new formula when the formula is copied to cell C2?
a. =A2+D2
a.=C2+B2
b.=C1+D1
c.=A2+B2

2. When calculating in MS Excel using the formula =6+(4/2), what is the answer?
d.5
e.8
f.12
g.7
3. If you copy the formula =$B38 into another cell, the result will be
a. The column part will remain the same
b. The row part will remain the same
c. Both the column and row will remain the same
d. Both will change

4. Which of the following is correct?


e. =AVERAGE(4, 5, 6, 7)
f. =AVERAGE(A1, B1, C1)
g. =AVERAGE(A1:A9, B1:B9)
h. All of the above
5. Which of the following shortcuts is used to edit the selected cell?
a.F3
b.F8
c. F4
d.F2

6. The intersection of row and column is called a ………


e.Dataset
f. Cell
g.Data
h.Set
7. In the formula =C2/$C$24, the dollar signs used in the C24 cell reference indicate…
a. Relative referencing has been turned off
b.Any value entered into cell C24 will be formatted with US currency.
c. The output of the formula will be formatted with US currency.
d.The value currently in C24 cannot be changed.

8. Which of the following is not a valid data type in MS Excel 2013?


e. Number
f. Character
g. Label
h. Date/Time
9. Which of the following formulas will MS Excel NOT be able to calculate?
a. =SUM(Sales)-A3
b. =SUM(A1:A5)*.5
c. =SUM(A1:A5)/(10-10)
d. =SUM(A1:A5)-10

10. When you accidentally make the error of typing the letter the letter "o" instead of a zero in
a formula, MS Excel 2013 will display……
e. #ERROR!
f. #VALUE!
g. #LABEL!
h. #NAME!
Excel Built-In Function Categories
Text, Logical, Date and Time
Lookup and Reference
Mathematical, Statistical, Financial
Database, Engineering,
Web Information, Cube
Mathematical Functions
Used to perform various arithmetic operations such as:
 Adding the values in a range of cells
 Finding the average of selected cells, etc.
 Conditional sums & products
 *Exponents & logarithms
 *The trigonometric ratios
Most Frequently Used Mathematical
Functions
MEDIAN (Situated in the middle)
 =MEDIAN(A1:A7)
 Find the median of the values of cells A1 through A7.
 For example, four is the median for 1, 2, 3, 4, 5, 6, 7.
MIN AND MAX
 =MIN/MAX(X:X) Min and Max represent the minimum or maximum amount
in the cells.
 For example, if you wanted to get the minimum value between cells A1 and
A30, you would put =MIN(A1:A30) or if you wanted to get the Maximum value
=MAX(A1:A30).
SYNTAX OF A FUNCTION
Most of the functions found in Excel require some input or information to calculate
correctly.
SYNTAX – Refers to the layout and order of the function and its arguments.
Also refers to the placement of round brackets or parentheses surrounding the
arguments and the use of the comma as a separator between the individual
arguments.
A function's arguments refer to all the data or information required by a function.
These arguments must be entered in the correct order. Most arguments are required,
but some are optional
When using the AVERAGE or SUM functions, you need to give it a range of numbers to
average or sum. Any input you give to a function is called an argument.
FUNCTION
ARGUMENT(S)
Arguments are the values that functions use to perform calculations
Types of Arguments in a Function
A. No arguments : such as RAND(), TODAY(), and NOW()
B. One argument: MAX(A1:A6), If you have defined a name for A1:A20 (such as
Sales), you can use the name in place of the reference: =SUM(Sales)
C. A fixed number of arguments: use multiple arguments in a function that uses a
comma in between =AVERAGE(A1:A6,B1:B6) & =SUM(A1:A6,B1:B6), =LEFT(A1,1)
D. Optional arguments: denoted with square brackets, i.e. used in VLOOKUP
(covered later on).
FUNCTION
ARGUMENT/S
There are two ways in which you can insert arguments in Excel.
• Typing the function directly in a cell
• Using the Excel function Argument dialogue box.
Numeric data (=SUM(5,10))
Text-string data (=UPPER(“siam”))
Boolean values (=OR(1+1=2))
Other functions (=DATE(YEAR(A2) + B2, MONTH(A2), DAY(A2)))
Round Functions
Excel round functions alter the actual value in a cell.
ROUND is the major rounding function in Excel that rounds a numeric
value to a specified number of digits.
 Syntax: ROUND(number, num_digits)
Number - any real number you want to round. This can be a number,
reference to a cell containing the number or a formula which results
in a number..
Num_digits - the number of digits to round the number to, argument
can be a negative or positive integer(whole number)
Round Function Examples
If num_digits is greater than 0, the number is rounded to the specified number of decimal
places.
 For example =ROUND(15.55, 1) rounds 15.55 to 15.6.
If num_digits is less than 0, all decimal places are removed and the number is rounded to the
left of the decimal point (to the nearest ten, hundred, thousand, etc.) Rounds the number of
places to the left of the decimal point
 For example =ROUND(15.55, -1) rounds 15.55 to the nearest 10 and returns 20 as the
result.
If num_digits equals 0, the number is rounded to the nearest integer (no decimal places).
 For example =ROUND(15.55, 0) rounds 15.55 to 16.
 The number is rounded to the nearest whole number.
Round General Rules
Does follow the general math rules for rounding
Where the number to the right of the rounding
digit determines whether the number is rounded
upwards or downwards
Rounding digit is the last significant digit retained
once the number is rounded
Round General Rules
Changes do depend on whether the digit that follows it is
greater or less than 5:
If the digit to the right of the rounding digit is 0, 1, 2, 3, or 4,
the rounding digit is not changed, and the number is said to
be rounded down.
If the rounding digit is followed by 5, 6, 7, 8, or 9, the
rounding digit is increased by one, and the number is
rounded up.
ROUND Formula
• How ROUND function is written and its result.
PRODUCT Function
Returns the product (multiplication) of a supplied set of
numerical values.
The syntax of the function is:
PRODUCT( number1, [number2], ... )
Where the number arguments are a set of numbers (or arrays
of numbers) that you want to calculate the product of.
Each argument can consist of an array of values or a range of
cells, each of which can contain many values.
PRODUCT Function
Date & Time Values
• Date & Time values are stored as decimals, comprised
of:
• an integer (representing the date)
• A fraction between 0 and 1 (representing the time)
• The cells should be made to show the correct result by
formatting into a 'General', 'Date', 'Time', or 'Date &
Time' format, depending on the required result type
Adding and Subtracting Dates
and Times
Since Excel stores dates & times as numbers, you can add, subtract and
compare dates and times in Excel in the same way that you would add or
subtract any other numbers.
Example - Calculate the Number of Days Between Two Given Dates
Cell B1 of the spreadsheet on the right uses the formula =A2-A1 to calculate
the number of days between the dates 20/08/2010 & 31/08/2010 (stored in
cells A1 and A2).
This gives the result 11.
Calculate the Difference Between Two
Times
Cell B1 of the spreadsheet on the right uses the formula =A2-A1 to calculate the
number of hours and minutes between the times 13:00 & 17:15 (stored in cells A1 and
A2).
Note that: To display this result, cell B1 should be formatted to have the time format
"hh: mm"
This gives the result 04:15
Calculate the Difference Between Two
Dates and Times
Cell B1 of the spreadsheet on the right uses the formula =A2-A1 to calculate the
number of hours and minutes between the two dates & times stored in cells A1
and A2.
This gives the result 16:00.
Note that: In order to display this result, cell B1 should be formatted to have the
time format "hh:mm".
Date Function
When supplied with integers representing a year,
month and day, the Excel date function returns an Excel
date.

The syntax of the function is:


 =DATE( year, month, day )

The year, month and day arguments are integers


Date Function Examples
Below the Date function is applied to different sets of
values.
Date Function
Errors
If you get an error from the Excel Date Function, this is likely to be one of the
following:

 #NUM! Occurs if the supplied year argument is < 0 or ≥ 10000.

 #VALUE! Occurs if any of the supplied arguments are non-numericvalues.


Time Function
Time Function
Accepts three integer arguments representing hours,
minutes and seconds, and returns an Excel time.
Returns the decimal value that represents the time in Excel.
The syntax is: =TIME( hour, minute, second )
Where the hour, minute and second arguments are integer
values representing the hour, minute and second parts of a
time.
Time Function Examples
Column E of the spreadsheet below shows three examples of the Excel Time function.

Note that the results in column E of the above spreadsheet are formatted with
the Time format hh:mm:ss.
Also note that, in cell E4, the Excel Time function successfully converts the
supplied value, 73 seconds, into the time of 1 minute and 13 seconds.
Time Function Errors

#NUM! - Occurs if the arguments evaluate to a negative


time (e.g. if the supplied hour is < 0).

#VALUE!- Occurs if any of the supplied arguments are


non-numeric values.
Lookup and Reference
Functions
Help to work with arrays (collections) of data

Particularly useful when you need to cross reference between different data
sets.

Perform tasks such as:


• Provide information about a range,
• return the location of a given address or value,
• Looking up specific values.
VLOOKUP FUNCTION
MS Excel VLOOKUP is a built-in function that searches for the value you specify and returns a
matching value from another column that searches for values in a column or row of a
spreadsheet list or table.

The V in VLOOKUP stands for vertical(column).

Basically, VLOOKUP lets you search for specific information in your spreadsheet.

For example, if you have a list of products with prices, you could search for the price of a
specific item.
VLOOKUP SYNTAX – 1
The syntax
=VLOOKUP(lookup_value,table_array,col_index_num,range_lookup)

VLOOKUP function has 4 (four) parameters, or arguments.

The first three parameters are REQUIRED, the last one is optional.
VLOOKUP SYNTAX –
2
1. lookup_value - the name of the item you're searching for.
a. can be either a value (number, date or text) or a cell reference (reference to
a cell containing a lookup value), or the value returned by some other Excel
function.
2. table_array - cell range that contains the data (two or more columns).
a. always searches for the lookup value in the first column of table_array.
b. The table_array may contain various values such as text, dates, numbers, or
logical values.
c. Values are case-insensitive, meaning that uppercase and lowercase text are
treated as identical.
VLOOKUP EXAMPLES – 1
Look up for number: =VLOOKUP(40, A2:B15, 2) - the formula will search for the
number 40.

Look up for text: =VLOOKUP("apples", A2:B15, 2) - the formula will search for
the text "apples".

Look up for value in another cell: =VLOOKUP(C2, A2:B15, 2) - the formula will
search for the value in cell C2.
VLOOKUP FUNCTION EXAMPLES
=VLOOKUP(40, A2:B15,2)

The function searches for "40" in cells A2 to A15 because A is the first
column of the table_array A2:B15

=VLOOKUP(40, A2:B15,2) The function searches for "40" in cells A2


through A15 and returns a matching value from column B (because B is
the 2nd column in the specified table_array A2:B15).
VLOOKUP Example
VLOOKUP FUNCTION - THINGS TO
REMEMBER!
VLOOKUP function cannot look at its left.

 It always searches for the lookup value in the left-most column of the
lookup range (table_array).

In VLOOKUP formulas, all values are case-insensitive, meaning that


uppercase and lowercase characters are treated as equivalent.
VLOOKUP FUNCTION – ERROR
MESSAGES!
If the lookup value is smaller than the smallest value in the first
column of your lookup range, the function returns the #N/A error.

If the 3rd parameter (col_index_num) is less than 1, the function will
return the #VALUE! error.

In cases when the argument is greater than the number of columns in
table_array, the function will return the #REF! error.
VLOOKUP FUNCTION – TIP
Use absolute cell references in the table_array argument of your
VLOOKUP formulas to have the correct lookup range when copying
the formulas. In this case, the lookup range will remain constant when
you copy the formula to other cells.
Consider using named ranges or Excel tables as an alternative.
When searching with approximate match (range_lookup set to TRUE
or omitted), always have the data in the first column in your lookup
range sorted in ascending order.
VLOOKUP FUNCTION - THINGS TO REMEMBER!
The importance of the final parameter. Supply TRUE or FALSE when appropriate.

When looking for exact matches, the fourth argument should always be FALSE; VLOOKUP
first searches vertically down the first column

VLOOKUP has two modes of operation: exact match and approximate match.

In most cases, you'll probably want to use VLOOKUP in exact match mode

Exact and approximate matching in VLOOKUP is controlled by the 4th argument, called
"range lookup"
VLOOKUP FUNCTION
VLOOKUP has two modes of operations: exact match and approximate match.

In most cases, you'll probably want to use VLOOKUP in exact match mode

Exact and approximate matching in VLOOKUP is controlled by the 4th argument,


called "range lookup"
VLOOKUP FUNCTION
• An approximate match, VLOOKUP assumes the table is sorted and performs a binary search.
During a binary search, if VLOOKUP finds an exact match value, it returns a value from that
row.

• If, however, VLOOKUP encounters a value greater than the lookup value, it will return a
value from the previous row.

• This is a dangerous default because many people unwittingly leave VLOOKUP in its default
mode, which can cause an incorrect result when the table is not sorted.

• To avoid this problem, make sure to use FALSE or zero as the 4th argument when you want
an exact match.
Any Questions
Next week’s lecture covers Advanced Functions

©2023 Mphago B. Botswana International University of Science and Technology 46

You might also like