Function
Function
06/21/16
Computer Centre
AND
Returns TRUE if all its arguments
are TRUE; returns FALSE if one or
more argument is FALSE.
Syntax
AND(logical1,logical2, ...)
Logical1, logical2 ... are 1 to 30
conditions you want to test that can
be either TRUE or FALSE.
06/21/16
Computer Centre
Example
Formula
Description (Result)
=AND(TRUE, TRUE)
=AND(TRUE, FALSE)
=AND(2+2=4, 2+3=5)
06/21/16
Computer Centre
A
50
104
Formula
Description (Result)
=AND(1<A2, A2<100)
OR
Returns TRUE if any argument is
TRUE; returns FALSE if all
arguments are FALSE.
Syntax
OR(logical1,logical2,...)
06/21/16
Logical1,logical2,... are 1 to 30
conditions you want to test that can be
either TRUE or FALSE.
Computer Centre
Eg:
Formula
Description (Result)
=OR(TRUE)
=OR(1+1=1,2+2=5)
Computer Centre
NOT
Reverses the value of its
argument. Use NOT when you
want to make sure a value is not
equal to one particular value.
06/21/16
Syntax
NOT(logical)
Logical is a value or expression
that can be evaluated to TRUE or
FALSE.
Computer Centre
Eg:
Formula
Description (Result)
=NOT(FALSE)
=NOT(1+1=2)
06/21/16
Computer Centre
TRUE
Returns the logical value
TRUE.
Syntax
TRUE( )
06/21/16
Computer Centre
FALSE
Returns the logical
value FALSE.
Syntax
FALSE( )
06/21/16
Computer Centre
10
IF
Returns one value if a condition you
Syntax
IF(logical_test,value_if_true,value_if_f
alse)
06/21/16
Computer Centre
11
Example
A
50
Formula
Description (Result)
=IF(A2<=100,"Within
budget","Over budget")
06/21/16
Computer Centre
12
900
500
900
500
925
Formula
Description (Result)
=IF(A2>B2,"Over
Budget","OK")
=IF(A3>B3,"Over
Budget","OK")
06/21/16
Computer Centre
13
If Score is
Then return
Score
Greater than 89
45
From 80 to 89
90
From 70 to 79
78
From 60 to 69
Less than 60
Formula
Description (Result)
=IF(A2>89,"A",IF(A2>79,"B",
IF(A2>69,"C",IF(A2>59,"D","F"))))
=IF(A3>89,"A",IF(A3>79,"B",
IF(A3>69,"C",IF(A3>59,"D","F"))))
=IF(A4>89,"A",IF(A4>79,"B",
IF(A4>69,"C",IF(A4>59,"D","F"))))
06/21/16
Computer Centre
14
Text Function
06/21/16
Computer Centre
15
Code
06/21/16
Computer Centre
16
Formula
Description (Result)
06/21/16
Computer Centre
17
CHAR
Returns the character specified by a
number. Use CHAR to translate code
page numbers you might get from files
on other types of computers into
characters.
Syntax CHAR (number)
Number is a number between 1 and
255 specifying which character you
want. The character is from the
character set used by your computer.
06/21/16
Computer Centre
18
Formula
Description (Result)
06/21/16
Computer Centre
19
CONCATENATE
Syntax
CONCATENATE (text1,text2,...)
Text1, text2, ... are 1 to 30 text items to be
joined into a single text item. The text items
can be text strings, numbers, or single-cell
references.
Remarks
The "&" operator can be used instead of
CONCATENATE to join text items.
06/21/16
Computer Centre
20
Data
brook trout
species
32
Formula
Description
=CONCATENATE("Stream
population for ",A2," ",A3," is
",A4,"/mile")
06/21/16
Computer Centre
21
EXACT
Compares two text strings and returns
TRUE if they are exactly the same,
FALSE otherwise. EXACT is casesensitive but ignores formatting
differences. Use EXACT to test text
being entered into a document.
Syntax
EXACT(text1,text2)
Text1 is the first text string.
Text2 is the second text string.
06/21/16
Computer Centre
22
word
Word
word
w ord
word
Formula
Description (Result)
=EXACT(A2,B2) Checks whether the strings in the first row match (TRUE)
=EXACT(A3,B3) Checks whether the strings in the second row match
(FALSE)
=EXACT(A4,B4) Checks whether the strings in the third row match (FALSE)
06/21/16
Computer Centre
23
FIND
FIND finds one text string (find_text) within
another text string (within_text), and returns
the number of the starting position of
find_text, from the first character of
within_text.
Syntax
FIND(find_text,within_text,start_num)
Find_text is the text you want to find.
Within_text is the text containing the text you
want to find.
Start_num specifies the character at which to
start the search. The first character in
within_text is character number 1. If you
Computer Centre
24
06/21/16
omit start_num, it is
assumed to be 1.
Data
Miriam McGovern
Formula
Description (Result)
=FIND("M",A2,3)
06/21/16
Position of the first "M" in the string above, starting with the third
character (8)
Computer Centre
25
SEARCH
SEARCH returns the number of the
character at which a specific
character or text string is first found,
beginning with start_num.
Syntax SEARCH(find_text,within_text,start_num)
Find_text is the text you want to
find.
Within_text is the text in which you
want to search for find_text.
Start_num is the character number
06/21/16
Computer Centre
26
Data
Statements
Profit Margin
margin
Formula
Description (Result)
=SEARCH("e",A2,6)
=SEARCH(A4,A3)
06/21/16
Computer Centre
27
LEFT
LEFT returns the first character or
characters in a text string, based on the
number of characters you specify.
Syntax
LEFT(text,num_chars)
Text is the text string that contains the
characters you want to extract.
Num_chars specifies the number of
characters you want LEFT to extract.
06/21/16
28
Data
Sale Price
Sweden
Formula
Description (Result)
06/21/16
Computer Centre
29
RIGHT
RIGHT returns the last character or
characters in a text string, based on
the number of characters you specify.
Syntax
RIGHT(text,num_chars)
06/21/16
Computer Centre
30
Data
Sale Price
Stock Number
Formula
Description (Result)
06/21/16
Computer Centre
31
MID
MID returns a specific number of
characters from a text string, starting at
the position you specify, based on the
number of characters you specify
Syntax
MID(text,start_num,num_chars)
06/21/16
32
LEN
LEN returns the number of
characters in a text string.
Syntax
LEN(text)
06/21/16
Computer Centre
33
Data
Fluid Flow
=MID(A2,7,20)
=MID(A2,20,5)
06/21/16
Computer Centre
34
Data
Phoenix, AZ
One
Formula
Description (Result)
=LEN(A2)
=LEN(A3)
=LEN(A4)
06/21/16
Computer Centre
35
LOWER
Converts all uppercase letters in a text string
to lowercase.
Syntax
LOWER(text)
Text is the text you want to
06/21/16
Computer Centre
36
Data
E. E. Cummings
Apt. 2B
Formula
=LOWER(A2)
06/21/16
Description
(Result)
Lower case of
first string (e. e.
cummings)
Lower case of
Computer Centre
37
VALUE
Converts a text string that represents a
number to a number.
Syntax
VALUE(text)
Text is the text enclosed in
06/21/16
Computer Centre
38
Example
Formula
=VALUE("$1,000")
Description (Result)
Number equivalent of
the string (1000)
06/21/16
Computer Centre
40
Now()
Returns the serial number of the current date
and time
Remarks
Microsoft Excel stores dates as sequential serial
numbers so they can be used in calculations. By
default, January 1, 1900 is serial number 1, and
January 1, 2008 is serial number 39448 because
it is 39,448 days after January 1, 1900.
Numbers to the right of the decimal point in the
serial number represent the time; numbers to
the left represent the date. For example, the
serial number .5 represents the time 12:00
noon.
06/21/16
Computer Centre
41
Syntax NOW(
)
Eg:
Now()
After ten minutes
repeat this
Now()
06/21/16
Computer Centre
42
Data
Format
1/1/1900
Date
1
_General
06/21/16
Computer Centre
43
Today()
Returns the serial number of the current date.
Syntax
TODAY( )
06/21/16
Computer Centre
44
Date()
Returns the sequential serial
number that represents a particular
date.
Syntax
DATE(year,month,day)
06/21/16
Computer Centre
45
Formula
Description (Result)
=DATE(A2,B2,C2)
Serial date for the date above, using the 1900 date system
(1/1/2008 or 39448)
06/21/16
Computer Centre
46
Time()
Returns the decimal number for a
particular time.
Syntax
TIME(hour,minute,second)
06/21/16
Computer Centre
47
16
48
10
=TIME(A2,B2,C2) Decimal part of a day, for the first time above (0.5)
=TIME(A3,B3,C3) Decimal part of a day, for the second time above (0.700115741)
06/21/16
Computer Centre
48
Day()
Returns the day of a date,
represented by a serial number. The
day is given as an integer ranging
from 1 to 31.
Syntax
DAY(serial_number)
06/21/16
Computer Centre
49
Date
15-Apr-2008
Formula
Description (Result)
=DAY(A2)
=Day(4-Jan)
=Day(26885)
06/21/16
Computer Centre
50
Month()
Syntax
MONTH (serial_number)
06/21/16
Computer Centre
51
Date
15-Apr-2008
Formula
Description (Result)
=MONTH(A2)
=Month(366)
06/21/16
Computer Centre
52
YEAR()
Syntax
YEAR(serial_number)
06/21/16
Computer Centre
53
Date
7/5/2008
7/5/10
Formula
Description (Result)
=YEAR(A2)
=YEAR(A3)
=Year(29747.007)
06/21/16
Computer Centre
54
Hour()
Returns the hour of a time value.
The hour is given as an integer,
ranging from 0 (12:00 A.M.) to 23
(11:00 P.M.).
Syntax
HOUR(serial_number)
06/21/16
Computer Centre
55
Time
3:30:30 AM
3:30:30 PM
15:30
Formula
Description (Result)
=HOUR(A2)
=HOUR(A3)
=HOUR(A4)
06/21/16
Computer Centre
56
Weekday()
Returns the day of the week
corresponding to a date. The day is given
as an integer, ranging from 1 (Sunday) to
7 (Saturday), by default.
Syntax
WEEKDAY(serial_number,return_type)
06/21/16
Computer Centre
57
Return_type
Number returned
1 or
omitted
06/21/16
Computer Centre
58
Data
2/14/2008
Formula
Description (Result)
=WEEKDAY(A2)
=WEEKDAY(A2,2) Day of the week, with numbers 1 (Monday) through 7 (Sunday) (4)
=WEEKDAY(A2,3) Day of the week, with numbers 0 (Monday) through 6 (Sunday) (3)
06/21/16
Computer Centre
59