Tuesday, August 31, 2010

MAX

Returns the largest value in a set of values.
Syntax
MAX(number1,number2,...)
Number1, number2, ...    are 1 to 30 numbers for which you want to find the maximum value.
Remarks

  • You can specify arguments that are numbers, empty cells, logical values, or text representations of numbers. Arguments that are error values or text that cannot be translated into numbers cause errors.
  • If an argument is an array or reference, only numbers in that array or reference are used. Empty cells, logical values, or text in the array or reference are ignored. If logical values and text must not be ignored, use MAXA instead.
  • If the arguments contain no numbers, MAX returns 0 (zero).
Example
The example may be easier to understand if you copy it to a blank worksheet.



A
1
Data
2
10
3
7
4
9
5
27
6
2


Formula
Description (Result)
=MAX(A2:A6)
Largest of the numbers above (27)
=MAX(A2:A6, 30)
Largest of the numbers above and 30 (30)

COUNT

Counts the number of cells that contain numbers and also numbers within the list of arguments. Use COUNT to get the number of entries in a number field that's in a range or array of numbers.
Syntax
COUNT(value1,value2,...)
Value1, value2, ...    are 1 to 30 arguments that can contain or refer to a variety of different types of data, but only numbers are counted.
Remarks

  • Arguments that are numbers, dates, or text representations of numbers are counted; arguments that are error values or text that cannot be translated into numbers are ignored.
  • If an argument is an array or reference, only numbers in that array or reference are counted. Empty cells, logical values, text, or error values in the array or reference are ignored. If you need to count logical values, text, or error values, use the COUNTA function.

Example

HYPERLINK

Creates a shortcut or jump that opens a document stored on a network server, an intranet, or the Internet. When you click the cell that contains the HYPERLINK function, Microsoft Excel opens the file stored at link_location.

Syntax
HYPERLINK(link_location,friendly_name)

Link_location is the path and file name to the document to be opened as text. Link_location can refer to a place in a document— such as a specific cell or named range in an Excel worksheet or workbook, or to a bookmark in a Microsoft Word document. The path can be to a file stored on a hard disk drive, or the path can be a universal naming convention (UNC) path on a server (in Microsoft Excel for Windows) or a Uniform Resource Locator (URL) path on the Internet or an intranet.
· Link_location can be a text string enclosed in quotation marks or a cell that contains the link as a text string.
· If the jump specified in link_location does not exist or cannot be navigated, an error appears when you click the cell.
Friendly_name is the jump text or numeric value that is displayed in the cell. Friendly_name is displayed in blue and is underlined. If friendly_name is omitted, the cell displays the link_location as the jump text.
· Friendly_name can be a value, a text string, a name, or a cell that contains the jump text or value.
· If friendly_name returns an error value (for example, #VALUE!), the cell displays the error instead of the jump text.
Remark
To select a cell that has a hyperlink in it without jumping to the hyperlink destination, click the cell and hold the mouse button until the cursor becomes a cross (+), then release the mouse button.
Examples

IF

Returns one value if a condition you specify evaluates to TRUE and another value if it evaluates to FALSE.
Use IF to conduct conditional tests on values and formulas.
Syntax
IF(logical_test,value_if_true,value_if_false)
Logical_test is any value or expression that can be evaluated to TRUE or FALSE. For example, A10=100 is a logical expression; if the value in cell A10 is equal to 100, the expression evaluates to TRUE. Otherwise, the expression evaluates to FALSE. This argument can use any comparison calculation operator.
Value_if_true is the value that is returned if logical_test is TRUE. For example, if this argument is the text string "Within budget" and the logical_test argument evaluates to TRUE, then the IF function displays the text "Within budget". If logical_test is TRUE and value_if_true is blank, this argument returns 0 (zero). To display the word TRUE, use the logical value TRUE for this argument. Value_if_true can be another formula.
Value_if_false is the value that is returned if logical_test is FALSE. For example, if this argument is the text string "Over budget" and the logical_test argument evaluates to FALSE, then the IF function displays the text "Over budget". If logical_test is FALSE and value_if_false is omitted, (that is, after value_if_true, there is no comma), then the logical value FALSE is returned. If logical_test is FALSE and value_if_false is blank (that is, after value_if_true, there is a comma followed by the closing parenthesis), then the value 0 (zero) is returned. Value_if_false can be another formula.
Remarks
  • Up to seven IF functions can be nested as value_if_true and value_if_false arguments to construct more elaborate tests. See the last of the following examples.
  • When the value_if_true and value_if_false arguments are evaluated, IF returns the value returned by those statements.
  • If any of the arguments to IF are arrays, every element of the array is evaluated when the IF statement is carried out.
  • Microsoft Excel provides additional functions that can be used to analyze your data based on a condition. For example, to count the number of occurrences of a string of text or a number within a range of cells, use the COUNTIF worksheet function. To calculate a sum based on a string of text or a number within a range, use the SUMIF worksheet function. Learn about calculating a value based on a condition.
Example 1

The example may be easier to understand if you copy it to a blank worksheet.

1
2
A
Data
50


Formula
Description (Result)
=IF(A2<=100,"Within budget","Over budget")
If the number above is less than or equal to 100, then the formula displays "Within budget". Otherwise, the function displays "Over budget" (Within budget)
=IF(A2=100,SUM(B5:B15),"")
If the number above is 100, then the range B5:B15 is calculated. Otherwise, empty text ("") is returned ()
Example 2
The example may be easier to understand if you copy it to a blank worksheet.

1
2
3
4
A
B
Actual Expenses
Predicted Expenses
1500
900
500
900
500
925

Formula
Description (Result)
=IF(A2>B2,"Over Budget","OK")
Checks whether the first row is over budget (Over Budget)
=IF(A3>B3,"Over Budget","OK")
Checks whether the second row is over budget (OK)
Example 3

AVERAGE

AVERAGE
Returns the average (arithmetic mean) of the arguments.
Syntax
AVERAGE(number1,number2,...)
Number1, number2, ...    are 1 to 30 numeric arguments for which you want the average.
Remarks
  • The arguments must either be numbers or be names, arrays, or references that contain numbers.
  • If an array or reference argument contains text, logical values, or empty cells, those values are ignored; however, cells with the value zero are included.
Tip
When averaging cells, keep in mind the difference between empty cells and those containing the value zero, especially if you have cleared the Zero values check box on the View tab (Options command, Tools menu). Empty cells are not counted, but zero values are.

Example
The example may be easier to understand if you copy it to a blank worksheet.
 
1
2
3
4
5
6







A
Data
10
7
9
27
2

Formula
Description (Result)
=AVERAGE(A2:A6)
Average of the numbers above (11)
=AVERAGE(A2:A6, 5)
Average of the numbers above and 5 (10)

SUM

Adds all the numbers in a range of cells.
Syntax
SUM(number1,number2, ...)
Number1, number2, ...    are 1 to 30 arguments for which you want the total value or sum.
Remarks
  • Numbers, logical values, and text representations of numbers that you type directly into the list of arguments are counted. See the first and second examples following.
  • If an argument is an array or reference, only numbers in that array or reference are counted. Empty cells, logical values, text, or error values in the array or reference are ignored. See the third example following.
  • Arguments that are error values or text that cannot be translated into numbers cause errors.
Example

The example may be easier to understand if you copy it to a blank worksheet.

 
1
2
3
4
5
6




A
Data
-5
15
30
'5
TRUE

Formula
Description (Result)
=SUM(3, 2)
Adds 3 and 2 (5)
=SUM("5", 15, TRUE)
Adds 5, 15 and 1, because the text values are translated into numbers, and the logical value TRUE is translated into the number 1 (21)
=SUM(A2:A4)
Adds the first three numbers in the column above (40)
=SUM(A2:A4, 15)
Adds the first three numbers in the column above, and 15 (55)
=SUM(A5,A6, 2)
Adds the values in the last two rows above, and 2. Because nonnumeric values in references are not translated, the values in the column above are ignored (2)