03 - Function Notes
03 - Function Notes
03 - Function Notes
TEXT FUNCTIONS
Excel EXACT Function:
Purpose:
Compare two text strings
Return value:
A boolean value (TRUE or FALSE)
Syntax:
=EXACT (text1, text2)
Parameter list:
text1 - The first text string to compare.
text2 - The second text string to compare.
Usage notes:
1. EXACT will compare two text strings and return TRUE if they are the same, and FALSE if not.
EXACT is case-sensitive.
2. You can also use the equal sign in a formula (text1=text2) to compare text strings. However, the
equal sign is not case sensitive.
Return value:
One or more characters.
Syntax:
=LEFT (text, [num_chars])
Parameter list:
LEFT will extract digits from numbers as well. Keep in mind that number formatting (i.e. the currency
symbol $) is not part of a number so is not counted or extracted.
Return value:
One or more characters.
Syntax:
=RIGHT (text, [num_chars])
Parameter list:
text - The text from which to extract characters on the right.
num_chars - [optional] The number of characters to extract, starting on the right. Optional, default = 1.
Usage notes:
Use the RIGHT function when you want to extract characters starting at the right side of text.
num_chars is optional and defaults to 1.
RIGHT will extract digits from numbers as well. Keep in mind that number formatting is not part of a and
will not be extracted or counted.
Return value:
The characters extracted.
Syntax:
=MID (text, start_num , num_chars )
Usage notes:
MID returns a specific number of characters from a text string, starting at start_num and continuing
through start_num + num_chars.
Use the MID function when you want to extract text from inside a text string, based on location and
length.
Return value:
Text in lower case.
Syntax:
=LOWER (text)
Parameter list:
text - The text that should be converted to lower case.
Usage notes:
All letters in text are converted to lower case.
Return value:
Uppercase text.
Syntax:
=UPPER (text)
Usage notes:
All letters in text are converted to upper case. Numbers and punctuation characters are not affected.
Return value:
Text in proper case.
Syntax:
=PROPER (text)
Parameter list:
text - The text that should be converted to proper case.
Usage notes:
Use PROPER to capitalize each word in a given string.
All letters in text will be converted to lower case before the first letter in each word is capitalized.
Return value:
Text with extra spaces removed.
Syntax:
=TRIM (text)
Parameter list:
text - The text from which to remove extra space.
Return value:
A number as text in the given format.
Syntax:
=TEXT (value, format_text)
Parameter list:
value - The number to convert.
format_text - The number format to use.
Usage notes:
Use the TEXT function to convert a number to text in a specific number format.
TEXT is especially useful when you want to embed the numeric output of a formula or function and
present it in a particular format inside other text. For example, "Sales last year increased by over
$43,500", where the number 43500 has been formatted with a currency symbol and thousands
separator.
Return value:
A number representing the lengh of the text.
Syntax:
=LEN (text)
Parameter list:
text - The text for which to calculate length.
Usage notes:
LEN is a useful when you want to count how many characters there are in some text.
Numbers and dates will also return a length keep in mind that number formatting is not included. (i.e.
the length of "100" formatted as "$100.00" is still 3).
Return value:
A number representing the median.
Syntax:
=MEDIAN (number1, [number2], ...)
Parameter list:
number1 - A number or cell reference that refers to numeric values.
number2 - [optional] A number or cell reference that refers to numeric values.
Usage notes:
The MEDIAN function returns the median (middle number) in a group of supplied arguments. For
example, =MEDIAN(1,2,3,4,5) returns 3.
When the total number of supplied numbers is odd, the median is calculated as the middle number in
the group. When the total number of supplied numbers is even, the median is calculated as the average
of the two numbers in the middle.
Numbers can be supplied as numbers, ranges, named ranges, or cell references that contain numeric
values. Up to 255 numbers can be supplied.
Return value:
A number representing the average.
Parameter list:
number1 - A number or cell reference that refers to numeric values.
number2 - [optional] A number or cell reference that refers to numeric values.
Usage notes:
The AVERAGE function returns the average (arithmetic mean) of a group of supplied numbers. To
calculate the average, Excel adds the numbers together and divides by the total number of numbers. For
example, AVERAGE (2,4,6) returns 4.
Numbers can be supplied as numbers, ranges, named ranges, or cell references that contain numeric
values. Up to 255 numbers can be supplied.
Return value:
The values you supply for TRUE or FALSE
Syntax:
=IF (logical_test, [value_if_true], [value_if_false])
Parameter list:
logical_test - A value or logical expression that can be evaluated as TRUE or FALSE.
value_if_true - [optional] The value to return when logical_test evaluates to TRUE.
value_if_false - [optional] The value to return when logical_test evaluates to FALSE.
Usage notes:
Use the IF function to test for or evaluate certain conditions. For example, to use the
IF function to assign a pass or fail to a a test score in A1, where 70 is the minimum
score to pass, you could use the this formula to display either "Pass" or "Fail":
IF functions can be nested. For example, if G5 contains a test score, the following
nested IF function can be used to assign a grade:
=IF(G5<64,"F",IF(G5<73,"D",IF(G5<85,"C",IF(G5<95,"B","A"))))
logical_test can use any Comparison Operator listed in the table below:
Comparison operator Meaning Example
= equal to A1=D1
value_if_true can be any value or expression. To return text, enclose the text in
double quotes. If value_if_true is not supplied, and logical_test evaluates to TRUE,
the IF function will return 0. To return TRUE, use the logical value TRUE
forvalue_if_true.
value_if_false can be any value or expression. If logical_test evaluates to FALSE
and value_if_false is not supplied IF will return FALSE.
If any of the arguments to IF are supplied as arrays, the IF function will evaluate
every element of the array.
Return value:
TRUE if all arguments evaluate TRUE; FALSE if not
Syntax:
=AND (logical1, [logical2], ...)
Parameter list:
logical1 - The first condition or logical value to evaluate.
logical2 - [optional] The second condition or logical value to evaluate.
Usage notes:
Use the AND function to test multiple conditions at the same time, up to 255 conditions. Each
logical condition (logical1, logical2, etc.) must evaluate to TRUE or FALSE, or be arrays or
references that contain logical values.
For example, to test if the value in A1 is greater than 0 and less than 5, use the following
formula:
=AND(A1>0,A1<5)
It can be useful to extend the functionality of functions like IF with AND. Using the above
example, you can supply AND as the logical_test for the IF function like so: