You are on page 1of 7

7/13/2012

Formulas and Functions with Microsoft Office Excel 2007

Understanding Relative Reference Format


When you use a cell reference in a formula, Excel looks at the cell address relative to the location of the formula. For example, suppose that you have the formula =A1*2 in cell A3. To Excel, this formula says, Multiply the contents of the cell two rows above this one by 2. This is called the relative reference format, and its the default format for Excel. This means that if you copy this formula to cell A4, the relative reference is still Multiply the contents of the cell two rows above this one by 2, but the formula changes to =A2*2 because A2 is two rows above A4.

Understanding Absolute Reference Format


When you refer to a cell in a formula using the absolute reference format, Excel uses the physical address of the cell. You tell the program that you want to use an absolute reference by placing dollar signs ($) before the row and column of the cell address. To return to the example in the preceding section, Excel interprets the formula =$A$1*2 as Multiply the contents of cell A1 by 2. No matter where you copy or move this formula, the cell reference doesnt change. The cell address is said to be anchored.

7/13/2012

Understanding Functions
You also should know that you can enter a cell reference using a mixed-reference format. In this format, you anchor either the cells row (by placing the dollar sign in front of the row address onlyfor example, B$6) or its column (by placing the dollar sign in front of the column address onlyfor example, $B6).
Functions are formulas that Excel has predefined. Excel has various function categories, including the following:
Text Logical Information Lookup and reference Date and time Math and trigonometry Statistical Financial Database and table

The Structure of a Function


Every function has the same basic form: FUNCTION(argument1, argument2, ...) The FUNCTION part is the name of the function, which always appears in uppercase letters (such as SUM or PMT). Note, however, that you dont need to type in the function name using uppercase letters. Whatever case you use, Excel automatically converts the name to all uppercase. In fact, its good practice to enter function names using only lowercase letters. That way, if Excel doesnt convert the function name to uppercase, you know that it doesnt recognize the name, which means you probably misspelled it.

Insert Function
1. Select the cell in which you want to use the function. 2. Enter the formula up to the point where you want to insert the function. 3. Click the Insert Function button in the formula bar. 4. The Insert Function dialog box appears

7/13/2012

5. Click All. 6. In the Select a Function list, click the function you want to use. 7. Click OK. Excel displays the Function Arguments dialog box. 8. For each required argument and each optional argument you want to use, enter a value, expression, or cell reference in the appropriate text box.

Working with Text Functions


The LOWER() Function
The LOWER() function converts a specified string to all-lowercase letters: =LOWER(text)

6. When youre finished, click OK.

The string you want to convert to lowercase For example, the following formula converts the text in cell B10 to lowercase: =LOWER(B10)

text

7/13/2012

The UPPER() Function The UPPER() function converts a specified string to all-uppercase letters: UPPER(text) Text The string you want to convert to uppercase For example, the following formula converts the text in cells A5 and B5 to uppercase and concatenates the results with a space between them: =UPPER(A5) & & UPPER(B5)

The PROPER() Function The PROPER() function converts a specified string to proper case, which means the first letter of each word appears in uppercase and the rest of the letters appear in lowercase: PROPER(text) Text The string you want to convert to proper case For example, the following formula, entered as an array, converts the text in the range A1:A10 to proper case: =PROPER(A1:A10)

The TRIM() Function You use the TRIM() function to remove excess spaces within a string: TRIM(text) Text The string from which you want the excess spaces removed

7/13/2012

The REPT() Function: Repeating a Character The REPT() function repeats a string a specified number of times: REPT(text, number) text The character or string you want to repeat Number The number of times to repeat text

=Advertising & REPT(., 20 - LEN(Advertising))

The LEFT() Function The LEFT() function returns a specified number of characters starting from the left of a string:

=REPT(|, B4)

=LEFT(text [,num_chars]) Text The string from which you want to extract the substring num_chars The number of characters you want to extract from the left (the default value is 1) For example, the following formula returns the substring Karen: =LEFT(Karen Elizabeth Hammond, 5)

7/13/2012

The RIGHT() Function The RIGHT() function returns a specified number of characters starting from the right of a string: =RIGHT(text [,num_chars]) text The string from which you want to extract the substring num_chars The number of characters you want to extract from the right (the default value is 1) For example, the following formula returns the substring Hammond: =RIGHT(Karen Elizabeth Hammond, 7)

The MID() Function The MID() function returns a specified number of characters starting from any point within a string: =MID(text, start_num, num_chars) text The string from which you want to extract the substring start_num The character position at which you want to start extracting the substring num_chars The number of characters you want to extract For example, the following formula returns the substring Elizabeth: =MID(Karen Elizabeth Hammond, 7, 9)

The TEXT() Function If you want total control over the way a number is formatted within a string, or if you want to include dates and times within strings, the powerful TEXT() function is what you need: =TEXT(number, format) Number The number, date, or time you want to convert format >The numeric or date/time format you want to apply to number Example
=The temperature was & TEXT(A3, #,##0.00F)

=UPPER(LEFT(A2, 3)) & TEXT(ROW(A2), 0000)

7/13/2012

The FIND() and SEARCH() Functions Searching for substrings is handled by the FIND() and SEARCH() functions: =FIND(find_text, within_text [,start_num]) =SEARCH(find_text, within_text [,start_num]) find_text The substring you want to look for within_text The string in which you want to look start_num The character position at which you want to start looking(the default is 1)

Working with Logical and Information Functions

IF function
The IF function returns one value if a condition you specify evaluates to TRUE, and another value if that condition evaluates to FALSE. For example, the formula =IF(A1>10,"Over 10","10 or less") returns "Over 10" if A1 is greater than 10, and "10 or less" if A1 is less than or equal to 10.
=IF(logical_test, value_if_true, [value_if_false]) logical_test Required. Any value or expression that can be evaluated to TRUE or FALSE value_if_true Required. The value that you want to be returned if the logical_test argument evaluates to TRUE. value_if_false Optional. The value that you want to be returned if the logical_test argument evaluates to FALSE.

You might also like