Download - Functions and Pivots
8/8/2019 Functions and Pivots
http://slidepdf.com/reader/full/functions-and-pivots 1/25
Functions/Pivots/Lookups
Sep/Oct 2010
8/8/2019 Functions and Pivots
http://slidepdf.com/reader/full/functions-and-pivots 2/25
Determining whether two strings are identical
You can set up a simple logical formula to determinewhether two cells contain the same entry. For example,use this formula to determine whether cell A1 has thesame contents as cell A2:
=A1=A2 Often, you don¶t need to worry about the case of the text.
But if you need to make an exact, case-sensitivecomparison, you can use the EXACT function. Theformula that follows returns TRUE only if cells A1 and A2contain exactly the same entry:
± =EXACT(A1,A2) ± When you compare text, be careful with space characters which
are often difficult to spot. The following formula returns FALSEbecause the first string contains a trailing space:
± =EXACT(³Christ ³,´Christ´)
8/8/2019 Functions and Pivots
http://slidepdf.com/reader/full/functions-and-pivots 3/25
Removing excess spaces and nonprinting
characters
Often data imported into an Excel worksheet containsexcess spaces or strange (often unprintable) characters.
Excel provides you with two functions to help whip your data into shape: TRIM and CLEAN: ± TRIM removes all leading and trailing spaces and replaces
internal strings of multiple spaces by a single space
± CLEAN removes all nonprinting characters from a string. These³garbage´ characters often appear when you import certain typesof data
This example uses the TRIM function. The formulareturns Fourth Quarter Earnings (with no excess spaces)
=TRIM(³ Fourth Quarter Earnings ³)
8/8/2019 Functions and Pivots
http://slidepdf.com/reader/full/functions-and-pivots 4/25
Counting characters in a string
Excel¶s LEN function takes one argument and returnsthe number of characters in the argument.
For example, assume the string September Sales iscontained in cell A1. The following formula will return 15:
=LEN(A1)
Space characters are included in the character count.
The following formula returns the total number of characters in the range A1:A3:
=LEN(A1)+LEN(A2)+LEN(A3)
8/8/2019 Functions and Pivots
http://slidepdf.com/reader/full/functions-and-pivots 5/25
Changing the case of text
UPPER converts the text to ALL UPPERCASE.
LOWER converts the text to all lowercase.
PROPER converts the text to Proper Case (the
first letter in each word is capitalized, as in aproper name) ± These functions are quite straightforward. The
formula that follows, for example, converts the text in
cell A1 to proper case. ± =PROPER(A1)
± If cell A1 contained the text MR. JAMES Q. SMITH,the formula would return Mr. James Q Smith.
8/8/2019 Functions and Pivots
http://slidepdf.com/reader/full/functions-and-pivots 6/25
Extracting characters from a
string Excel users often need to extract characters from astring. For example, you may have a list of employeenames (first and last names) and need to extract the lastname from each cell. Excel provides several useful
functions for extracting characters: ± LEFT returns a specified number of characters from thebeginning of a string.
± RIGHT returns a specified number of characters from the end of a string.
± MID returns a specified number of characters beginning at anyposition within a string
The formula that follows returns the last 10 characters from cell A1(if A1 contains fewer than 10 characters, the formula returns all textin the cell):
=RIGHT(A1,10)
8/8/2019 Functions and Pivots
http://slidepdf.com/reader/full/functions-and-pivots 10/25
Introducing Lookup Formulas
A lookup formula essentially returns a
value from a table by looking up another
related value.
A common telephone directory provides a
good analogy. If you want to find a
person¶s telephone number, you first
locate the name (look it up) and thenretrieve the corresponding number.
8/8/2019 Functions and Pivots
http://slidepdf.com/reader/full/functions-and-pivots 13/25
The VLOOKUP function The VLOOKUP function looks up the value in the first column of the lookuptable and returns the corresponding value in a specified table column. The
lookup table is arranged vertically (which explains the V in the function¶sname). The syntax for the VLOOKUP function is
± VLOOKUP(lookup_value,table_array,col_index_num,range_lookup)
The VLOOKUP function¶s arguments are as follows: ± lookup_value: The value to be looked up in the first column of the lookup table.
± t able_array : The range that contains the lookup table.
± c ol_index_num: The column number within the table from which the matchingvalue is returned.
± range_lookup: Optional. If TRUE or omitted, an approximate match is returned.(If an exact match is not found, the next largest value that is less thanlookup_value is returned.) If FALSE, VLOOKUP will search for an exact match. If VLOOKUP can¶t find an exact match, the function returns #N/A.
8/8/2019 Functions and Pivots
http://slidepdf.com/reader/full/functions-and-pivots 18/25
Financial Functions
8/8/2019 Functions and Pivots
http://slidepdf.com/reader/full/functions-and-pivots 19/25
Financial Functions contd..
8/8/2019 Functions and Pivots
http://slidepdf.com/reader/full/functions-and-pivots 20/25
Financial functions contd..
8/8/2019 Functions and Pivots
http://slidepdf.com/reader/full/functions-and-pivots 21/25
Financial Functions Contd«
8/8/2019 Functions and Pivots
http://slidepdf.com/reader/full/functions-and-pivots 22/25
Financial Functions Contd..
8/8/2019 Functions and Pivots
http://slidepdf.com/reader/full/functions-and-pivots 23/25
Financial Functions Contd
8/8/2019 Functions and Pivots
http://slidepdf.com/reader/full/functions-and-pivots 24/25
Summary of Our Learnings
Identical Strings
Counting Characters in a String
Changing the case of strings
Extracting characters from strings
DATEDIF Function
CountIF
Different Functions used in Lookup
IF Function
Lookup Functions ± VLOOKUP ± HLOOKUP ± LOOKUP
Financial Functions Concepts
Financial Function Arguments
Few Financial Functions
± PMT ± PPMT ± IPMT ± RATE ± NPER ± PV