Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 36

Chapter 3 :

MICROSOFT
EXCEL
(BUILD-IN FUNCTION) 1
Objectives
: Lookup function

Logical function

Statistical function

Date time

function
2
3.3 Built-in
Function
 Excel provides a large number of built-in functions that can be used to perform
specific calculations or to return information about the spreadsheet data.
These functions are organized into categories such as :

 Lookup Function
 Logical Function
 Statistical Function
 Date time function

and many more to help users to locate the function needed from the Excel menu.

3
3.3.1 Lookup
Function

LOOKUP function returns a value from a range (one row or one column) or from an array.

It is categorized as a Reference Function.
 The most popular lookup functions are : a) HLOOKUP (Horizontal Lookup)
b) VLOOKUP (Vertical Lookup)
These functions are located on the Lookup & Reference drop-down menu on the Formulas
tab of the Ribbon as well as in the Lookup & Reference category in the Insert Function
dialog box.

4
3.3.1 Lookup
Function
1. Click
Formula
tab
2. Click drop
down
arrow of
Lookup &
Reference
button
3. Select
HLookup or
VLookup

5
3.3.1 Lookup Function :
VLookup

VLOOKUP function searches vertically (from top to bottom) the leftmost column of a
Lookup table until the program locates a value that matches or exceeds the one you
are looking up.
 It is designed to work with data that is organized into columns.
 The VLOOKUP function uses the following syntax:

VLOOKUP(lookup_value,table_array,col_index_num,[range_lookup])

6
3.3.1 Lookup Function : VLookup
(Example
Syntax :
1)
VLOOKUP(lookup_value,table_array,col_index_num,[range_lookup])

1.The VLOOKUP function looks up the


value 53 (first argument : cell H2) in
the leftmost column of the red table
(second argument : cell range, B3:E9).

2.The value 4 (third argument) tells


the VLOOKUP function to return the
value in the same row from the fourth
column (column name : Salary) of the
red table.

7
3.3.1 Lookup Function : VLookup
(Example
1)
Exact match

Note:
The Boolean FALSE (fourth
argument) tells the VLOOKUP
function to return an exact
match.
If the VLOOKUP function cannot
find the value 53 in the first
column, it will return a #N/A error
.

8
3.3.1 Lookup Function : VLookup
(Example
2)
The VLOOKUP function returns
the
last name
Third argument (column name
: Last Name) is set to 3 of ID
79.

9
3.3.1 Lookup Function : VLookup
(Example
3)
1.The VLOOKUP function looks up
Approximate match
the value 85 (first argument : cell F3)
in the leftmost column of the red
table (second argument : cell range
B3:C7).
2.The value 2 (third argument) tells
the VLOOKUP function to return the
value in the same row from the
second column (column name :
Grade) of the red table.

3.There's just one problem. There's


no value 85 in the first column.

10
3.3.1 Lookup Function : VLookup
(Example
3)
1. Fortunately, the Boolean TRUE (fourth
argument) tells the VLOOKUP function to
return an approximate match. If the
VLOOKUP function cannot find the value
85 in the first column, it will return the
largest value smaller than 85. In this
example, this will be the value 80.

11
3.3.1 Lookup Function :
HLookup
HLOOKUP function searches horizontally (from left to right) the top most row of a Lookup
table until it locates a value that matches or exceeds the one that you’re looking up.
 It is designed to work with data that is organized into rows.
 The HLOOKUP function syntax:

HLOOKUP(lookup_value,table_array,row_index_num,[range_lookup])

 In both functions, the lookup_value argument is the value that you want to look up in the
Lookup table, and table_array is the cell range or name of the Lookup table that contains
both the value to look up and the related value to return.

12
3.3.1 Lookup Function :
HLookup
Syntax :
(Exampl
HLOOKUP(lookup_value,table_array,row_index_num,[range_lookup])

e)

13
3.3.2 Logical Function :

IF
IF function checks whether a condition is met, and returns one value if true and another
value if false.
 Example : cell C2

 Explanation: if the score is greater than or equal to 60, the IF function returns Pass,
else it returns Fail.

14
3.3.2 Logical Function :
AND

AND Function returns TRUE if all conditions are true and returns FALSE if any of the
conditions are false.
 Example, take a look at the AND function in cell D2 below.

Explanation: the AND function returns TRUE if the first score is greater than or equal to 60
and the second score is greater than or equal to 90, else it returns FALSE.

15
3.3.2 Logical Function :
OR
OR function returns TRUE if any of the conditions are TRUE and returns FALSE if all
conditions are false.
 Example : Cell B2

 Explanation: the OR function returns TRUE if at least one score is greater than or equal
to 60, else it returns FALSE.

16
3.3.2 Logical Function :
NOT

NOT function changes TRUE to FALSE, and FALSE to
TRUE.
 Example : cell D2

 Explanation: in this example, the NOT function reverses the result of the OR
function

17
3.3.3 Statistical Function :
Median

MEDIAN function is used to find the median (or middle)
number.

 Check:

18
3.3.3 Statistical Function :
Mode

MODE function is used to find the most frequently occurring
number.

19
3.3.3 Statistical Function :
Min

MIN function is used to find the minimum
value.

20
3.3.3 Statistical Function :
Standard

Deviation
STEDV function is used to calculate the standard deviation.
 Standard deviation is a number that tells you how far numbers are from their
mean.

21
3.3.3 Statistical Function :
Large

LARGE function is used to find the third largest
number.

 Check
:

22
3.3.3 Statistical Function :
Small

SMALL function is used to find the second smallest
number.

 Check
:

23
3.3.3 Statistical Function :
Count
COUNT function is used to count the number of cells that contains numbers within a list
of arguments.
**Value1, value2, ...are 1 to 30 arguments that can contain or
 Syntax : refer to a variety of different types of data, but only numbers
COUNT(value1,value2, ...) are counted.
* Empty cells, logical values, text, or error values in the
array or reference are ignored.




24
3.3.3 Statistical Function :
CountA

COUNTA function is used to count logical values, text, or error
values.
 Syntax : COUNTA(value1,value2, ...)





COUNTA(B2:B6) ????

tex
t

25
3.3.3 Statistical Function :
CountA

26
3.3.3 Statistical Function :
CountBlank

COUNTBLANK function is used to count the number of blank
cells.

COUNTBLANK(A2:A6)= 1

27
3.3.3 Statistical Function :
Countif

COUNTIF function is used to count cells based on one criteria (for example, greater than
9).

28
3.3.3 Statistical Function :
Countifs
COUNTIFS function is used to count cells based on multiple criteria (for example, green
and greater than 9).

29
3.3.4 Date & Time
Function

To enter a date in Excel, use the "/" or "-" characters.

To enter a time, use the ":" (colon).
 You can also enter a date and a time in one cell.
Dates and times are stored in MS Excel as number on which calculations can be performed.
The date 1st January 1900 is counted as day 1. Excel recognizes 1st Jan‐1990 through 31
Dec‐9999.
Times are stored as fractions of a day. Both date and time can be entered in fixed
format and will never change, or in floating format in which case they will work from the
system date and time held by the computer.

30
3.3.4 Date & Time
Function

Shortcut keystroke for system date Ctrl+ ;

Date and time must be entered in a format Excel recognizes.
 Excel will not recognize full stops.
Oct 04 1/4/04 1‐October‐04 are all recognized formats but
1.4.04 is not recognized by Excel
 Dates are aligned to the right. If Excel does not recognize your format as a
number it will align it
to the left as a text format.
 To enter a Date or Time select the Date & Time button form the Formulas
Ribbon

31
3.3.4 Date & Time
Function

32
3.3.4 Date Function : Year, Month &
Day

YEAR function is used to get the year of a date.

**Note: use the MONTH and DAY


function to get the month and day
of a date.

=MONTH(A1) 6

=DAY(A1) 23

33
3.3.4 Date
Function

To add a number of days to a date, use the following simple
formula.

 To add a number of years, months and/or days.

**Note: the DATE function accepts


three arguments: year, month and day.
Excel knows that 6 + 2 = 8 = August has
31 days and rolls over to the next
month (23 August + 9 days = 1
September).

34
3.3.4 Date Function : Todays
Date

TODAY function is used to enter today's
date.

35
3.3.4 Date & Time Function : Current
Date &
 NOW function is used to enter the current date and
time.
Time

36

You might also like