Basic - All - Excel - Function PDF
Basic - All - Excel - Function PDF
See Also
Averages the values in a column of a list or database that match conditions you specify.
Syntax
DAVERAGE(database,field,criteria)
Database is the range of cells that makes up the list or database. A database is a list of related data in which rows of related
information are records, and columns of data are fields. The first row of the list contains labels for each column.
Field indicates which column is used in the function. Field can be given as text with the column label enclosed between double
quotation marks, such as "Age" or "Yield," or as a number that represents the position of the column within the list: 1 for the first
column, 2 for the second column, and so on.
Criteria is the range of cells that contains the conditions you specify. You can use any range for the criteria argument, as long as it
includes at least one column label and at least one cell below the column label for specifying a condition for the column.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1. Create a blank workbook or worksheet.
2. Select the example in the Help topic. Do not select the row or column headers.
Selecting an example from Help
3. Press CTRL+C.
4. In the worksheet, select cell A1, and press CTRL+V.
5. To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the
Tools menu, point to Formula Auditing, and then click Formula Auditing Mode.
1
2
3
4
5
6
7
8
9
10
A B C D E F
Tree Height Age Yield Profit Height
Apple >10 <16
Pear
Tree Height Age Yield Profit
Apple 18 20 14 105.00
Pear 12 12 10 96.00
Cherry 13 14 9 105.00
Apple 14 15 10 75.00
Pear 9 8 8 76.80
Apple 8 9 6 45.00
Formula Description (Result)
=DCOUNT
(A4:E10,"Age",A1:F2)
This function looks at the records of apple trees between a height of
10 and 16 and counts how many of the Age fields in those records
contain numbers. (1)
=DCOUNTA
(A4:E10,"Profit",A1:F2)
This function looks at the records of apple trees between a height of
10 and 16 and counts how many of the Profit fields in those records
are not blank. (1)
=DMAX
(A4:E10,"Profit",A1:A3)
The maximum profit of apple and pear trees. (105)
Page 1of 3 DAVERAGE
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
Tips
You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the
column label for specifying the condition.
For example, if the range G1:G2 contains the column label Income in G1 and the amount 10,000 in G2, you could define the range
as MatchIncome and use that name as the criteria argument in the database functions.
Although the criteria range can be located anywhere on the worksheet, do not place the criteria range below the list. If you add
more information to the list by using the Form command on the Data menu, the new information is added to the first row below
the list. I f the row below the list is not blank, Microsoft Excel cannot add the new information.
Make sure the criteria range does not overlap the list.
To perform an operation on an entire column in a database, enter a blank line below the column labels in the criteria range.
Examples of criteria
Multiple conditions in a single column
If you have two or more conditions for a single column, type the criteria directly below each other in separate rows. For example,
the following criteria range displays the rows that contain either "Davolio," "Buchanan," or "Suyama" in the Salesperson column.
One condition in two or more columns
To find data that meets one condition in two or more columns, enter all the criteria in the same row of the criteria range. For
example, the following criteria range displays all rows that contain "Produce" in the Type column, "Davolio" in the Salesperson
column, and sales values greater than $1,000.
One condition in one column or another
To find data that meets either a condition in one column or a condition in another column, enter the criteria in different rows of
the criteria range. For example, the following criteria range displays all rows that contain either "Produce" in the Type column,
=DMI N
(A4:E10,"Profit",A1:B2)
The minimum profit of apple trees over 10 in height. (75)
=DSUM
(A4:E10,"Profit",A1:A2)
The total profit from apple trees. (225)
=DSUM
(A4:E10,"Profit",A1:F2)
The total profit from apple trees with a height between 10 and 16. (75)
=DPRODUCT
(A4:E10,"Yield",A1:B2)
The product of the yields from apple trees with a height greater than
10. (140)
=DAVERAGE
(A4:E10,"Yield",A1:B2)
The average yield of apple trees over 10 feet in height. (12)
=DAVERAGE
(A4:E10,3,A4:E10)
The average age of all trees in the database. (13)
=DSTDEV
(A4:E10,"Yield",A1:A3)
The estimated standard deviation in the yield of apple and pear trees if
the data in the database is only a sample of the total orchard
population. (2.97)
=DSTDEVP
(A4:E10,"Yield",A1:A3)
The true standard deviation in the yield of apple and pear trees if the
data in the database is the entire population. (2.65)
=DVAR
(A4:E10,"Yield",A1:A3)
The estimated variance in the yield of apple and pear trees if the data
in the database is only a sample of the total orchard population. (8.8)
=DVARP
(A4:E10,"Yield",A1:A3)
The true variance in the yield of apple and pear trees if the data in the
database is the entire orchard population. ( 7.04)
=DGET
(A4:E10,"Yield",A1:A3)
Returns the #NUM! error value because more than one record meets
the criteria.
Salesperson
Davolio
Buchanan
Suyama
Type Salesperson Sales
Produce Davolio >1000
Page 2of 3 DAVERAGE
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
"Davolio" in the Salesperson column, or sales values greater than $1,000.
One of two sets of conditions for two columns
To find rows that meet one of two sets of conditions, where each set includes conditions for more than one column, type the
criteria in separate rows. For example, the following criteria range displays the rows that contain both "Davolio" in the Salesperson
column and sales values greater than $3,000, and also displays the rows for salesperson Buchanan with sales values greater than
$1,500.
More than two sets of conditions for one column
To find rows that meet greater than two sets of conditions, include multiple columns with the same column heading. For example,
the following criteria range displays sales that are between 5,000 and 8,000 in addition to sales that are less than 500.
Conditions created as the result of a formula
You can use a calculated value that is the result of a formula (formula: A sequence of values, cell references, names, functions, or
operators in a cell that together produce a new value. A formula always begins with an equal sign (=).) as your criterion. When
you use a formula to create a criterion, do not use a column label for a criteria label; either keep the criteria label blank or use a
label that is not a column label in the list. For example, the following criteria range displays rows that have a value in column C
greater than the average of cells C7:C10.
Notes
The formula you use for a condition must use a relative reference (relative reference: In a formula, the address of a cell based
on the relative position of the cell that contains the formula and the cell referred to. If you copy the formula, the reference
automatically adjusts. A relative reference takes the form A1.) to refer to the column label (for example, Sales) or the
corresponding field in the first record. All other references in the formula must be absolute references (absolute cell reference:
In a formula, the exact address of a cell, regardless of the position of the cell that contains the formula. An absolute cell
reference takes the form $A$1.), and the formula must evaluate to TRUE or FALSE. I n the formula example, "C7" refers to the
field (column C) for the first record (row 7) of the list.
You can use a column label in the formula instead of a relative cell reference or a range name. When Microsoft Excel displays
an error value such as #NAME? or #VALUE! in the cell that contains the criterion, you can ignore this error because it does not
affect how the list is filtered.
When evaluating data, Microsoft Excel does not distinguish between uppercase and lowercase characters.
Type Salesperson Sales
Produce
Davolio
>1000
Salesperson Sales
Davolio >3000
Buchanan >1500
Sales Sales
>5000 <8000
<500
=C7>AVERAGE($C$7:$C$10)
Page 3of 3 DAVERAGE
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
DCOUNT
See Also
Counts the cells that contain numbers in a column of a list or database that match conditions you specify.
The field argument is optional. I f field is omitted, DCOUNT counts all records in the database that match the criteria.
Syntax
DCOUNT(database,field,criteria)
Database is the range of cells that makes up the list or database. A database is a list of related data in which rows of related
information are records, and columns of data are fields. The first row of the list contains labels for each column.
Field indicates which column is used in the function. Field can be given as text with the column label enclosed between double
quotation marks, such as "Age" or "Yield," or as a number that represents the position of the column within the list: 1 for the first
column, 2 for the second column, and so on.
Criteria is the range of cells that contains the conditions you specify. You can use any range for the criteria argument, as long as it
includes at least one column label and at least one cell below the column label for specifying a condition for the column.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1. Create a blank workbook or worksheet.
2. Select the example in the Help topic. Do not select the row or column headers.
Selecting an example from Help
3. Press CTRL+C.
4. In the worksheet, select cell A1, and press CTRL+V.
5. To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the
Tools menu, point to Formula Auditing, and then click Formula Auditing Mode.
1
2
3
4
5
6
7
8
9
10
A B C D E F
Tree Height Age Yield Profit Height
Apple >10 <16
Pear
Tree Height Age Yield Profit
Apple 18 20 14 105.00
Pear 12 12 10 96.00
Cherry 13 14 9 105.00
Apple 14 15 10 75.00
Pear 9 8 8 76.80
Apple 8 9 6 45.00
Formula Description (Result)
=DCOUNT
(A4:E10,"Age",A1:F2)
This function looks at the records of apple trees between a height of
10 and 16 and counts how many of the Age fields in those records
contain numbers. (1)
=DCOUNTA
(A4:E10,"Profit",A1:F2)
This function looks at the records of apple trees between a height of
10 and 16 and counts how many of the Profit fields in those records
are not blank. (1)
=DMAX The maximum profit of apple and pear trees. (105)
Page 1of 3 DCOUNT
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
Tips
You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the
column label for specifying the condition.
For example, if the range G1:G2 contains the column label Income in G1 and the amount 10,000 in G2, you could define the range
as MatchIncome and use that name as the criteria argument in the database functions.
Although the criteria range can be located anywhere on the worksheet, do not place the criteria range below the list. If you add
more information to the list by using the Form command on the Data menu, the new information is added to the first row below
the list. I f the row below the list is not blank, Microsoft Excel cannot add the new information.
Make sure the criteria range does not overlap the list.
To perform an operation on an entire column in a database, enter a blank line below the column labels in the criteria range.
Examples of criteria
Multiple conditions in a single column
If you have two or more conditions for a single column, type the criteria directly below each other in separate rows. For example,
the following criteria range displays the rows that contain either "Davolio," "Buchanan," or "Suyama" in the Salesperson column.
One condition in two or more columns
To find data that meets one condition in two or more columns, enter all the criteria in the same row of the criteria range. For
example, the following criteria range displays all rows that contain "Produce" in the Type column, "Davolio" in the Salesperson
column, and sales values greater than $1,000.
One condition in one column or another
(A4:E10,"Profit",A1:A3)
=DMI N
(A4:E10,"Profit",A1:B2)
The minimum profit of apple trees over 10 in height. (75)
=DSUM
(A4:E10,"Profit",A1:A2)
The total profit from apple trees. (225)
=DSUM
(A4:E10,"Profit",A1:F2)
The total profit from apple trees with a height between 10 and 16. (75)
=DPRODUCT
(A4:E10,"Yield",A1:B2)
The product of the yields from apple trees with a height greater than
10. (140)
=DAVERAGE
(A4:E10,"Yield",A1:B2)
The average yield of apple trees over 10 feet in height. (12)
=DAVERAGE
(A4:E10,3,A4:E10)
The average age of all trees in the database. (13)
=DSTDEV
(A4:E10,"Yield",A1:A3)
The estimated standard deviation in the yield of apple and pear trees if
the data in the database is only a sample of the total orchard
population. (2.97)
=DSTDEVP
(A4:E10,"Yield",A1:A3)
The true standard deviation in the yield of apple and pear trees if the
data in the database is the entire population. (2.65)
=DVAR
(A4:E10,"Yield",A1:A3)
The estimated variance in the yield of apple and pear trees if the data
in the database is only a sample of the total orchard population. (8.8)
=DVARP
(A4:E10,"Yield",A1:A3)
The true variance in the yield of apple and pear trees if the data in the
database is the entire orchard population. ( 7.04)
=DGET
(A4:E10,"Yield",A1:A3)
Returns the #NUM! error value because more than one record meets
the criteria.
Salesperson
Davolio
Buchanan
Suyama
Type Salesperson Sales
Produce Davolio >1000
Page 2of 3 DCOUNT
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
To find data that meets either a condition in one column or a condition in another column, enter the criteria in different rows of
the criteria range. For example, the following criteria range displays all rows that contain either "Produce" in the Type column,
"Davolio" in the Salesperson column, or sales values greater than $1,000.
One of two sets of conditions for two columns
To find rows that meet one of two sets of conditions, where each set includes conditions for more than one column, type the
criteria in separate rows. For example, the following criteria range displays the rows that contain both "Davolio" in the Salesperson
column and sales values greater than $3,000, and also displays the rows for salesperson Buchanan with sales values greater than
$1,500.
More than two sets of conditions for one column
To find rows that meet greater than two sets of conditions, include multiple columns with the same column heading. For example,
the following criteria range displays sales that are between 5,000 and 8,000 in addition to sales that are less than 500.
Conditions created as the result of a formula
You can use a calculated value that is the result of a formula (formula: A sequence of values, cell references, names, functions, or
operators in a cell that together produce a new value. A formula always begins with an equal sign (=).) as your criterion. When
you use a formula to create a criterion, do not use a column label for a criteria label; either keep the criteria label blank or use a
label that is not a column label in the list. For example, the following criteria range displays rows that have a value in column C
greater than the average of cells C7:C10.
Notes
The formula you use for a condition must use a relative reference (relative reference: In a formula, the address of a cell based
on the relative position of the cell that contains the formula and the cell referred to. If you copy the formula, the reference
automatically adjusts. A relative reference takes the form A1.) to refer to the column label (for example, Sales) or the
corresponding field in the first record. All other references in the formula must be absolute references (absolute cell reference:
In a formula, the exact address of a cell, regardless of the position of the cell that contains the formula. An absolute cell
reference takes the form $A$1.), and the formula must evaluate to TRUE or FALSE. I n the formula example, "C7" refers to the
field (column C) for the first record (row 7) of the list.
You can use a column label in the formula instead of a relative cell reference or a range name. When Microsoft Excel displays
an error value such as #NAME? or #VALUE! in the cell that contains the criterion, you can ignore this error because it does not
affect how the list is filtered.
When evaluating data, Microsoft Excel does not distinguish between uppercase and lowercase characters.
Type Salesperson Sales
Produce
Davolio
>1000
Salesperson Sales
Davolio >3000
Buchanan >1500
Sales Sales
>5000 <8000
<500
=C7>AVERAGE($C$7:$C$10)
Page 3of 3 DCOUNT
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
DCOUNTA
See Also
Counts the nonblank cells in a column of a list or database that match conditions you specify.
The field argument is optional. I f field is omitted, DCOUNTA counts all records in the database that match the criteria.
Syntax
DCOUNTA(database,field,criteria)
Database is the range of cells that makes up the list or database. A database is a list of related data in which rows of related
information are records, and columns of data are fields. The first row of the list contains labels for each column.
Field indicates which column is used in the function. Field can be given as text with the column label enclosed between double
quotation marks, such as "Age" or "Yield," or as a number that represents the position of the column within the list: 1 for the first
column, 2 for the second column, and so on.
Criteria is the range of cells that contains the conditions you specify. You can use any range for the criteria argument, as long as it
includes at least one column label and at least one cell below the column label for specifying a condition for the column.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
5
6
7
8
9
10
A B C D E F
Tree Height Age Yield Profit Height
Apple >10 <16
Pear
Tree Height Age Yield Profit
Apple 18 20 14 105.00
Pear 12 12 10 96.00
Cherry 13 14 9 105.00
Apple 14 15 10 75.00
Pear 9 8 8 76.80
Apple 8 9 6 45.00
Formula Description (Result)
=DCOUNT
(A4:E10,"Age",A1:F2)
This function looks at the records of apple trees between a height of
10 and 16 and counts how many of the Age fields in those records
contain numbers. (1)
=DCOUNTA
(A4:E10,"Profit",A1:F2)
This function looks at the records of apple trees between a height of
10 and 16 and counts how many of the Profit fields in those records
are not blank. (1)
=DMAX
(A4:E10,"Profit",A1:A3)
The maximum profit of apple and pear trees. (105)
=DMI N
(A4:E10,"Profit",A1:B2)
The minimum profit of apple trees over 10 in height. (75)
=DSUM
(A4:E10,"Profit",A1:A2)
The total profit from apple trees. (225)
=DSUM
(A4:E10,"Profit",A1:F2)
The total profit from apple trees with a height between 10 and 16. (75)
=DPRODUCT
(A4:E10,"Yield",A1:B2)
The product of the yields from apple trees with a height greater than
10. (140)
=DAVERAGE
(A4:E10,"Yield",A1:B2)
The average yield of apple trees over 10 feet in height. (12)
=DAVERAGE
(A4:E10,3,A4:E10)
The average age of all trees in the database. (13)
=DSTDEV
(A4:E10,"Yield",A1:A3)
The estimated standard deviation in the yield of apple and pear trees if
the data in the database is only a sample of the total orchard
Page 1of 3 DCOUNTA
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
Tips
You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the
column label for specifying the condition.
For example, if the range G1:G2 contains the column label Income in G1 and the amount 10,000 in G2, you could define the range
as MatchIncome and use that name as the criteria argument in the database functions.
Although the criteria range can be located anywhere on the worksheet, do not place the criteria range below the list. If you add
more information to the list by using the Form command on the Data menu, the new information is added to the first row below
the list. I f the row below the list is not blank, Microsoft Excel cannot add the new information.
Make sure the criteria range does not overlap the list.
To perform an operation on an entire column in a database, enter a blank line below the column labels in the criteria range.
Examples of criteria
Multiple conditions in a single column
If you have two or more conditions for a single column, type the criteria directly below each other in separate rows. For example,
the following criteria range displays the rows that contain either "Davolio," "Buchanan," or "Suyama" in the Salesperson column.
One condition in two or more columns
To find data that meets one condition in two or more columns, enter all the criteria in the same row of the criteria range. For
example, the following criteria range displays all rows that contain "Produce" in the Type column, "Davolio" in the Salesperson
column, and sales values greater than $1,000.
One condition in one column or another
To find data that meets either a condition in one column or a condition in another column, enter the criteria in different rows of
the criteria range. For example, the following criteria range displays all rows that contain either "Produce" in the Type column,
"Davolio" in the Salesperson column, or sales values greater than $1,000.
One of two sets of conditions for two columns
To find rows that meet one of two sets of conditions, where each set includes conditions for more than one column, type the
criteria in separate rows. For example, the following criteria range displays the rows that contain both "Davolio" in the Salesperson
column and sales values greater than $3,000, and also displays the rows for salesperson Buchanan with sales values greater than
$1,500.
population. (2.97)
=DSTDEVP
(A4:E10,"Yield",A1:A3)
The true standard deviation in the yield of apple and pear trees if the
data in the database is the entire population. (2.65)
=DVAR
(A4:E10,"Yield",A1:A3)
The estimated variance in the yield of apple and pear trees if the data
in the database is only a sample of the total orchard population. (8.8)
=DVARP
(A4:E10,"Yield",A1:A3)
The true variance in the yield of apple and pear trees if the data in the
database is the entire orchard population. ( 7.04)
=DGET
(A4:E10,"Yield",A1:A3)
Returns the #NUM! error value because more than one record meets
the criteria.
Salesperson
Davolio
Buchanan
Suyama
Type Salesperson Sales
Produce Davolio >1000
Type Salesperson Sales
Produce
Davolio
>1000
Salesperson Sales
Page 2of 3 DCOUNTA
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
More than two sets of conditions for one column
To find rows that meet greater than two sets of conditions, include multiple columns with the same column heading. For example,
the following criteria range displays sales that are between 5,000 and 8,000 in addition to sales that are less than 500.
Conditions created as the result of a formula
You can use a calculated value that is the result of a formula (formula: A sequence of values, cell references, names, functions, or
operators in a cell that together produce a new value. A formula always begins with an equal sign (=).) as your criterion. When
you use a formula to create a criterion, do not use a column label for a criteria label; either keep the criteria label blank or use a
label that is not a column label in the list. For example, the following criteria range displays rows that have a value in column C
greater than the average of cells C7:C10.
Notes
The formula you use for a condition must use a relative reference (relative reference: In a formula, the address of a cell based
on the relative position of the cell that contains the formula and the cell referred to. If you copy the formula, the reference
automatically adjusts. A relative reference takes the form A1.) to refer to the column label (for example, Sales) or the
corresponding field in the first record. All other references in the formula must be absolute references (absolute cell reference:
In a formula, the exact address of a cell, regardless of the position of the cell that contains the formula. An absolute cell
reference takes the form $A$1.), and the formula must evaluate to TRUE or FALSE. I n the formula example, "C7" refers to the
field (column C) for the first record (row 7) of the list.
You can use a column label in the formula instead of a relative cell reference or a range name. When Microsoft Excel displays
an error value such as #NAME? or #VALUE! in the cell that contains the criterion, you can ignore this error because it does not
affect how the list is filtered.
When evaluating data, Microsoft Excel does not distinguish between uppercase and lowercase characters.
Davolio >3000
Buchanan >1500
Sales Sales
>5000 <8000
<500
=C7>AVERAGE($C$7:$C$10)
Page 3of 3 DCOUNTA
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
DGET
See Also
Extracts a single value from a column of a list or database that matches conditions you specify.
Syntax
DGET(database,field,criteria)
Database is the range of cells that makes up the list or database. A database is a list of related data in which rows of related
information are records, and columns of data are fields. The first row of the list contains labels for each column.
Field indicates which column is used in the function. Field can be given as text with the column label enclosed between double
quotation marks, such as "Age" or "Yield," or as a number that represents the position of the column within the list: 1 for the first
column, 2 for the second column, and so on.
Criteria is the range of cells that contains the conditions you specify. You can use any range for the criteria argument, as long as it
includes at least one column label and at least one cell below the column label for specifying a condition for the column.
Remarks
If no record matches the criteria, DGET returns the #VALUE! error value.
If more than one record matches the criteria, DGET returns the #NUM! error value.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
5
6
7
8
9
10
A B C D E F
Tree Height Age Yield Profit Height
Apple >10 <16
Pear
Tree Height Age Yield Profit
Apple 18 20 14 105.00
Pear 12 12 10 96.00
Cherry 13 14 9 105.00
Apple 14 15 10 75.00
Pear 9 8 8 76.80
Apple 8 9 6 45.00
Formula Description (Result)
=DCOUNT
(A4:E10,"Age",A1:F2)
This function looks at the records of apple trees between a height of
10 and 16 and counts how many of the Age fields in those records
contain numbers. (1)
=DCOUNTA
(A4:E10,"Profit",A1:F2)
This function looks at the records of apple trees between a height of
10 and 16 and counts how many of the Profit fields in those records
are not blank. (1)
=DMAX
(A4:E10,"Profit",A1:A3)
The maximum profit of apple and pear trees. (105)
=DMI N
(A4:E10,"Profit",A1:B2)
The minimum profit of apple trees over 10 in height. (75)
=DSUM
(A4:E10,"Profit",A1:A2)
The total profit from apple trees. (225)
=DSUM
(A4:E10,"Profit",A1:F2)
The total profit from apple trees with a height between 10 and 16. (75)
=DPRODUCT
(A4:E10,"Yield",A1:B2)
The product of the yields from apple trees with a height greater than
10. (140)
=DAVERAGE
(A4:E10,"Yield",A1:B2)
The average yield of apple trees over 10 feet in height. (12)
=DAVERAGE The average age of all trees in the database. (13)
Page 1of 3 DGET
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
Tips
You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the
column label for specifying the condition.
For example, if the range G1:G2 contains the column label Income in G1 and the amount 10,000 in G2, you could define the range
as MatchIncome and use that name as the criteria argument in the database functions.
Although the criteria range can be located anywhere on the worksheet, do not place the criteria range below the list. If you add
more information to the list by using the Form command on the Data menu, the new information is added to the first row below
the list. I f the row below the list is not blank, Microsoft Excel cannot add the new information.
Make sure the criteria range does not overlap the list.
To perform an operation on an entire column in a database, enter a blank line below the column labels in the criteria range.
Examples of criteria
Multiple conditions in a single column
If you have two or more conditions for a single column, type the criteria directly below each other in separate rows. For example,
the following criteria range displays the rows that contain either "Davolio," "Buchanan," or "Suyama" in the Salesperson column.
One condition in two or more columns
To find data that meets one condition in two or more columns, enter all the criteria in the same row of the criteria range. For
example, the following criteria range displays all rows that contain "Produce" in the Type column, "Davolio" in the Salesperson
column, and sales values greater than $1,000.
One condition in one column or another
To find data that meets either a condition in one column or a condition in another column, enter the criteria in different rows of
the criteria range. For example, the following criteria range displays all rows that contain either "Produce" in the Type column,
"Davolio" in the Salesperson column, or sales values greater than $1,000.
One of two sets of conditions for two columns
To find rows that meet one of two sets of conditions, where each set includes conditions for more than one column, type the
criteria in separate rows. For example, the following criteria range displays the rows that contain both "Davolio" in the Salesperson
column and sales values greater than $3,000, and also displays the rows for salesperson Buchanan with sales values greater than
(A4:E10,3,A4:E10)
=DSTDEV
(A4:E10,"Yield",A1:A3)
The estimated standard deviation in the yield of apple and pear trees if
the data in the database is only a sample of the total orchard
population. (2.97)
=DSTDEVP
(A4:E10,"Yield",A1:A3)
The true standard deviation in the yield of apple and pear trees if the
data in the database is the entire population. (2.65)
=DVAR
(A4:E10,"Yield",A1:A3)
The estimated variance in the yield of apple and pear trees if the data
in the database is only a sample of the total orchard population. (8.8)
=DVARP
(A4:E10,"Yield",A1:A3)
The true variance in the yield of apple and pear trees if the data in the
database is the entire orchard population. ( 7.04)
=DGET
(A4:E10,"Yield",A1:A3)
Returns the #NUM! error value because more than one record meets
the criteria.
Salesperson
Davolio
Buchanan
Suyama
Type Salesperson Sales
Produce Davolio >1000
Type Salesperson Sales
Produce
Davolio
>1000
Page 2of 3 DGET
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
$1,500.
More than two sets of conditions for one column
To find rows that meet greater than two sets of conditions, include multiple columns with the same column heading. For example,
the following criteria range displays sales that are between 5,000 and 8,000 in addition to sales that are less than 500.
Conditions created as the result of a formula
You can use a calculated value that is the result of a formula (formula: A sequence of values, cell references, names, functions, or
operators in a cell that together produce a new value. A formula always begins with an equal sign (=).) as your criterion. When
you use a formula to create a criterion, do not use a column label for a criteria label; either keep the criteria label blank or use a
label that is not a column label in the list. For example, the following criteria range displays rows that have a value in column C
greater than the average of cells C7:C10.
Notes
The formula you use for a condition must use a relative reference (relative reference: In a formula, the address of a cell based
on the relative position of the cell that contains the formula and the cell referred to. If you copy the formula, the reference
automatically adjusts. A relative reference takes the form A1.) to refer to the column label (for example, Sales) or the
corresponding field in the first record. All other references in the formula must be absolute references (absolute cell reference:
In a formula, the exact address of a cell, regardless of the position of the cell that contains the formula. An absolute cell
reference takes the form $A$1.), and the formula must evaluate to TRUE or FALSE. I n the formula example, "C7" refers to the
field (column C) for the first record (row 7) of the list.
You can use a column label in the formula instead of a relative cell reference or a range name. When Microsoft Excel displays
an error value such as #NAME? or #VALUE! in the cell that contains the criterion, you can ignore this error because it does not
affect how the list is filtered.
When evaluating data, Microsoft Excel does not distinguish between uppercase and lowercase characters.
Salesperson Sales
Davolio >3000
Buchanan >1500
Sales Sales
>5000 <8000
<500
=C7>AVERAGE($C$7:$C$10)
Page 3of 3 DGET
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
DMAX
See Also
Returns the largest number in a column of a list or database that matches conditions you specify.
Syntax
DMAX(database,field,criteria)
Database is the range of cells that makes up the list or database. A database is a list of related data in which rows of related
information are records, and columns of data are fields. The first row of the list contains labels for each column.
Field indicates which column is used in the function. Field can be given as text with the column label enclosed between double
quotation marks, such as "Age" or "Yield," or as a number that represents the position of the column within the list: 1 for the first
column, 2 for the second column, and so on.
Criteria is the range of cells that contains the conditions you specify. You can use any range for the criteria argument, as long as it
includes at least one column label and at least one cell below the column label for specifying a condition for the column.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
5
6
7
8
9
10
A B C D E F
Tree Height Age Yield Profit Height
Apple >10 <16
Pear
Tree Height Age Yield Profit
Apple 18 20 14 105.00
Pear 12 12 10 96.00
Cherry 13 14 9 105.00
Apple 14 15 10 75.00
Pear 9 8 8 76.80
Apple 8 9 6 45.00
Formula Description (Result)
=DCOUNT
(A4:E10,"Age",A1:F2)
This function looks at the records of apple trees between a height of
10 and 16 and counts how many of the Age fields in those records
contain numbers. (1)
=DCOUNTA
(A4:E10,"Profit",A1:F2)
This function looks at the records of apple trees between a height of
10 and 16 and counts how many of the Profit fields in those records
are not blank. (1)
=DMAX
(A4:E10,"Profit",A1:A3)
The maximum profit of apple and pear trees. (105)
=DMI N
(A4:E10,"Profit",A1:B2)
The minimum profit of apple trees over 10 in height. (75)
=DSUM
(A4:E10,"Profit",A1:A2)
The total profit from apple trees. (225)
=DSUM
(A4:E10,"Profit",A1:F2)
The total profit from apple trees with a height between 10 and 16. (75)
=DPRODUCT
(A4:E10,"Yield",A1:B2)
The product of the yields from apple trees with a height greater than
10. (140)
=DAVERAGE
(A4:E10,"Yield",A1:B2)
The average yield of apple trees over 10 feet in height. (12)
=DAVERAGE
(A4:E10,3,A4:E10)
The average age of all trees in the database. (13)
=DSTDEV
(A4:E10,"Yield",A1:A3)
The estimated standard deviation in the yield of apple and pear trees if
the data in the database is only a sample of the total orchard
population. (2.97)
Page 1of 3 DMAX
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
Tips
You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the
column label for specifying the condition.
For example, if the range G1:G2 contains the column label Income in G1 and the amount 10,000 in G2, you could define the range
as MatchIncome and use that name as the criteria argument in the database functions.
Although the criteria range can be located anywhere on the worksheet, do not place the criteria range below the list. If you add
more information to the list by using the Form command on the Data menu, the new information is added to the first row below
the list. I f the row below the list is not blank, Microsoft Excel cannot add the new information.
Make sure the criteria range does not overlap the list.
To perform an operation on an entire column in a database, enter a blank line below the column labels in the criteria range.
Examples of criteria
Multiple conditions in a single column
If you have two or more conditions for a single column, type the criteria directly below each other in separate rows. For example,
the following criteria range displays the rows that contain either "Davolio," "Buchanan," or "Suyama" in the Salesperson column.
One condition in two or more columns
To find data that meets one condition in two or more columns, enter all the criteria in the same row of the criteria range. For
example, the following criteria range displays all rows that contain "Produce" in the Type column, "Davolio" in the Salesperson
column, and sales values greater than $1,000.
One condition in one column or another
To find data that meets either a condition in one column or a condition in another column, enter the criteria in different rows of
the criteria range. For example, the following criteria range displays all rows that contain either "Produce" in the Type column,
"Davolio" in the Salesperson column, or sales values greater than $1,000.
One of two sets of conditions for two columns
To find rows that meet one of two sets of conditions, where each set includes conditions for more than one column, type the
criteria in separate rows. For example, the following criteria range displays the rows that contain both "Davolio" in the Salesperson
column and sales values greater than $3,000, and also displays the rows for salesperson Buchanan with sales values greater than
$1,500.
=DSTDEVP
(A4:E10,"Yield",A1:A3)
The true standard deviation in the yield of apple and pear trees if the
data in the database is the entire population. (2.65)
=DVAR
(A4:E10,"Yield",A1:A3)
The estimated variance in the yield of apple and pear trees if the data
in the database is only a sample of the total orchard population. (8.8)
=DVARP
(A4:E10,"Yield",A1:A3)
The true variance in the yield of apple and pear trees if the data in the
database is the entire orchard population. ( 7.04)
=DGET
(A4:E10,"Yield",A1:A3)
Returns the #NUM! error value because more than one record meets
the criteria.
Salesperson
Davolio
Buchanan
Suyama
Type Salesperson Sales
Produce Davolio >1000
Type Salesperson Sales
Produce
Davolio
>1000
Salesperson Sales
Davolio >3000
Page 2of 3 DMAX
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
More than two sets of conditions for one column
To find rows that meet greater than two sets of conditions, include multiple columns with the same column heading. For example,
the following criteria range displays sales that are between 5,000 and 8,000 in addition to sales that are less than 500.
Conditions created as the result of a formula
You can use a calculated value that is the result of a formula (formula: A sequence of values, cell references, names, functions, or
operators in a cell that together produce a new value. A formula always begins with an equal sign (=).) as your criterion. When
you use a formula to create a criterion, do not use a column label for a criteria label; either keep the criteria label blank or use a
label that is not a column label in the list. For example, the following criteria range displays rows that have a value in column C
greater than the average of cells C7:C10.
Notes
The formula you use for a condition must use a relative reference (relative reference: In a formula, the address of a cell based
on the relative position of the cell that contains the formula and the cell referred to. If you copy the formula, the reference
automatically adjusts. A relative reference takes the form A1.) to refer to the column label (for example, Sales) or the
corresponding field in the first record. All other references in the formula must be absolute references (absolute cell reference:
In a formula, the exact address of a cell, regardless of the position of the cell that contains the formula. An absolute cell
reference takes the form $A$1.), and the formula must evaluate to TRUE or FALSE. I n the formula example, "C7" refers to the
field (column C) for the first record (row 7) of the list.
You can use a column label in the formula instead of a relative cell reference or a range name. When Microsoft Excel displays
an error value such as #NAME? or #VALUE! in the cell that contains the criterion, you can ignore this error because it does not
affect how the list is filtered.
When evaluating data, Microsoft Excel does not distinguish between uppercase and lowercase characters.
Buchanan >1500
Sales Sales
>5000 <8000
<500
=C7>AVERAGE($C$7:$C$10)
Page 3of 3 DMAX
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
DMI N
See Also
Returns the smallest number in a column of a list or database that matches conditions you specify.
Syntax
DMI N(database,field,criteria)
Database is the range of cells that makes up the list or database. A database is a list of related data in which rows of related
information are records, and columns of data are fields. The first row of the list contains labels for each column.
Field indicates which column is used in the function. Field can be given as text with the column label enclosed between double
quotation marks, such as "Age" or "Yield," or as a number that represents the position of the column within the list: 1 for the first
column, 2 for the second column, and so on.
Criteria is the range of cells that contains the conditions you specify. You can use any range for the criteria argument, as long as it
includes at least one column label and at least one cell below the column label for specifying a condition for the column.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
5
6
7
8
9
10
A B C D E F
Tree Height Age Yield Profit Height
Apple >10 <16
Pear
Tree Height Age Yield Profit
Apple 18 20 14 105.00
Pear 12 12 10 96.00
Cherry 13 14 9 105.00
Apple 14 15 10 75.00
Pear 9 8 8 76.80
Apple 8 9 6 45.00
Formula Description (Result)
=DCOUNT
(A4:E10,"Age",A1:F2)
This function looks at the records of apple trees between a height of
10 and 16 and counts how many of the Age fields in those records
contain numbers. (1)
=DCOUNTA
(A4:E10,"Profit",A1:F2)
This function looks at the records of apple trees between a height of
10 and 16 and counts how many of the Profit fields in those records
are not blank. (1)
=DMAX
(A4:E10,"Profit",A1:A3)
The maximum profit of apple and pear trees. (105)
=DMI N
(A4:E10,"Profit",A1:B2)
The minimum profit of apple trees over 10 in height. (75)
=DSUM
(A4:E10,"Profit",A1:A2)
The total profit from apple trees. (225)
=DSUM
(A4:E10,"Profit",A1:F2)
The total profit from apple trees with a height between 10 and 16. (75)
=DPRODUCT
(A4:E10,"Yield",A1:B2)
The product of the yields from apple trees with a height greater than
10. (140)
=DAVERAGE
(A4:E10,"Yield",A1:B2)
The average yield of apple trees over 10 feet in height. (12)
=DAVERAGE
(A4:E10,3,A4:E10)
The average age of all trees in the database. (13)
=DSTDEV
(A4:E10,"Yield",A1:A3)
The estimated standard deviation in the yield of apple and pear trees if
the data in the database is only a sample of the total orchard
population. (2.97)
Page 1of 3 DMIN
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
Tips
You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the
column label for specifying the condition.
For example, if the range G1:G2 contains the column label Income in G1 and the amount 10,000 in G2, you could define the range
as MatchIncome and use that name as the criteria argument in the database functions.
Although the criteria range can be located anywhere on the worksheet, do not place the criteria range below the list. If you add
more information to the list by using the Form command on the Data menu, the new information is added to the first row below
the list. I f the row below the list is not blank, Microsoft Excel cannot add the new information.
Make sure the criteria range does not overlap the list.
To perform an operation on an entire column in a database, enter a blank line below the column labels in the criteria range.
Examples of criteria
Multiple conditions in a single column
If you have two or more conditions for a single column, type the criteria directly below each other in separate rows. For example,
the following criteria range displays the rows that contain either "Davolio," "Buchanan," or "Suyama" in the Salesperson column.
One condition in two or more columns
To find data that meets one condition in two or more columns, enter all the criteria in the same row of the criteria range. For
example, the following criteria range displays all rows that contain "Produce" in the Type column, "Davolio" in the Salesperson
column, and sales values greater than $1,000.
One condition in one column or another
To find data that meets either a condition in one column or a condition in another column, enter the criteria in different rows of
the criteria range. For example, the following criteria range displays all rows that contain either "Produce" in the Type column,
"Davolio" in the Salesperson column, or sales values greater than $1,000.
One of two sets of conditions for two columns
To find rows that meet one of two sets of conditions, where each set includes conditions for more than one column, type the
criteria in separate rows. For example, the following criteria range displays the rows that contain both "Davolio" in the Salesperson
column and sales values greater than $3,000, and also displays the rows for salesperson Buchanan with sales values greater than
$1,500.
=DSTDEVP
(A4:E10,"Yield",A1:A3)
The true standard deviation in the yield of apple and pear trees if the
data in the database is the entire population. (2.65)
=DVAR
(A4:E10,"Yield",A1:A3)
The estimated variance in the yield of apple and pear trees if the data
in the database is only a sample of the total orchard population. (8.8)
=DVARP
(A4:E10,"Yield",A1:A3)
The true variance in the yield of apple and pear trees if the data in the
database is the entire orchard population. ( 7.04)
=DGET
(A4:E10,"Yield",A1:A3)
Returns the #NUM! error value because more than one record meets
the criteria.
Salesperson
Davolio
Buchanan
Suyama
Type Salesperson Sales
Produce Davolio >1000
Type Salesperson Sales
Produce
Davolio
>1000
Salesperson Sales
Davolio >3000
Page 2of 3 DMIN
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
More than two sets of conditions for one column
To find rows that meet greater than two sets of conditions, include multiple columns with the same column heading. For example,
the following criteria range displays sales that are between 5,000 and 8,000 in addition to sales that are less than 500.
Conditions created as the result of a formula
You can use a calculated value that is the result of a formula (formula: A sequence of values, cell references, names, functions, or
operators in a cell that together produce a new value. A formula always begins with an equal sign (=).) as your criterion. When
you use a formula to create a criterion, do not use a column label for a criteria label; either keep the criteria label blank or use a
label that is not a column label in the list. For example, the following criteria range displays rows that have a value in column C
greater than the average of cells C7:C10.
Notes
The formula you use for a condition must use a relative reference (relative reference: In a formula, the address of a cell based
on the relative position of the cell that contains the formula and the cell referred to. If you copy the formula, the reference
automatically adjusts. A relative reference takes the form A1.) to refer to the column label (for example, Sales) or the
corresponding field in the first record. All other references in the formula must be absolute references (absolute cell reference:
In a formula, the exact address of a cell, regardless of the position of the cell that contains the formula. An absolute cell
reference takes the form $A$1.), and the formula must evaluate to TRUE or FALSE. I n the formula example, "C7" refers to the
field (column C) for the first record (row 7) of the list.
You can use a column label in the formula instead of a relative cell reference or a range name. When Microsoft Excel displays
an error value such as #NAME? or #VALUE! in the cell that contains the criterion, you can ignore this error because it does not
affect how the list is filtered.
When evaluating data, Microsoft Excel does not distinguish between uppercase and lowercase characters.
Buchanan >1500
Sales Sales
>5000 <8000
<500
=C7>AVERAGE($C$7:$C$10)
Page 3of 3 DMIN
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
DPRODUCT
See Also
Multiplies the values in a column of a list or database that match conditions you specify.
Syntax
DPRODUCT(database,field,criteria)
Database is the range of cells that makes up the list or database. A database is a list of related data in which rows of related
information are records, and columns of data are fields. The first row of the list contains labels for each column.
Field indicates which column is used in the function. Field can be given as text with the column label enclosed between double
quotation marks, such as "Age" or "Yield," or as a number that represents the position of the column within the list: 1 for the first
column, 2 for the second column, and so on.
Criteria is the range of cells that contains the conditions you specify. You can use any range for the criteria argument, as long as it
includes at least one column label and at least one cell below the column label for specifying a condition for the column.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
5
6
7
8
9
10
A B C D E F
Tree Height Age Yield Profit Height
Apple >10 <16
Pear
Tree Height Age Yield Profit
Apple 18 20 14 105.00
Pear 12 12 10 96.00
Cherry 13 14 9 105.00
Apple 14 15 10 75.00
Pear 9 8 8 76.80
Apple 8 9 6 45.00
Formula Description (Result)
=DCOUNT
(A4:E10,"Age",A1:F2)
This function looks at the records of apple trees between a height of
10 and 16 and counts how many of the Age fields in those records
contain numbers. (1)
=DCOUNTA
(A4:E10,"Profit",A1:F2)
This function looks at the records of apple trees between a height of
10 and 16 and counts how many of the Profit fields in those records
are not blank. (1)
=DMAX
(A4:E10,"Profit",A1:A3)
The maximum profit of apple and pear trees. (105)
=DMI N
(A4:E10,"Profit",A1:B2)
The minimum profit of apple trees over 10 in height. (75)
=DSUM
(A4:E10,"Profit",A1:A2)
The total profit from apple trees. (225)
=DSUM
(A4:E10,"Profit",A1:F2)
The total profit from apple trees with a height between 10 and 16. (75)
=DPRODUCT
(A4:E10,"Yield",A1:B2)
The product of the yields from apple trees with a height greater than
10. (140)
=DAVERAGE
(A4:E10,"Yield",A1:B2)
The average yield of apple trees over 10 feet in height. (12)
=DAVERAGE
(A4:E10,3,A4:E10)
The average age of all trees in the database. (13)
=DSTDEV
(A4:E10,"Yield",A1:A3)
The estimated standard deviation in the yield of apple and pear trees if
the data in the database is only a sample of the total orchard
population. (2.97)
Page 1of 3 DPRODUCT
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
Tips
You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the
column label for specifying the condition.
For example, if the range G1:G2 contains the column label Income in G1 and the amount 10,000 in G2, you could define the range
as MatchIncome and use that name as the criteria argument in the database functions.
Although the criteria range can be located anywhere on the worksheet, do not place the criteria range below the list. If you add
more information to the list by using the Form command on the Data menu, the new information is added to the first row below
the list. I f the row below the list is not blank, Microsoft Excel cannot add the new information.
Make sure the criteria range does not overlap the list.
To perform an operation on an entire column in a database, enter a blank line below the column labels in the criteria range.
Examples of criteria
Multiple conditions in a single column
If you have two or more conditions for a single column, type the criteria directly below each other in separate rows. For example,
the following criteria range displays the rows that contain either "Davolio," "Buchanan," or "Suyama" in the Salesperson column.
One condition in two or more columns
To find data that meets one condition in two or more columns, enter all the criteria in the same row of the criteria range. For
example, the following criteria range displays all rows that contain "Produce" in the Type column, "Davolio" in the Salesperson
column, and sales values greater than $1,000.
One condition in one column or another
To find data that meets either a condition in one column or a condition in another column, enter the criteria in different rows of
the criteria range. For example, the following criteria range displays all rows that contain either "Produce" in the Type column,
"Davolio" in the Salesperson column, or sales values greater than $1,000.
One of two sets of conditions for two columns
To find rows that meet one of two sets of conditions, where each set includes conditions for more than one column, type the
criteria in separate rows. For example, the following criteria range displays the rows that contain both "Davolio" in the Salesperson
column and sales values greater than $3,000, and also displays the rows for salesperson Buchanan with sales values greater than
$1,500.
=DSTDEVP
(A4:E10,"Yield",A1:A3)
The true standard deviation in the yield of apple and pear trees if the
data in the database is the entire population. (2.65)
=DVAR
(A4:E10,"Yield",A1:A3)
The estimated variance in the yield of apple and pear trees if the data
in the database is only a sample of the total orchard population. (8.8)
=DVARP
(A4:E10,"Yield",A1:A3)
The true variance in the yield of apple and pear trees if the data in the
database is the entire orchard population. ( 7.04)
=DGET
(A4:E10,"Yield",A1:A3)
Returns the #NUM! error value because more than one record meets
the criteria.
Salesperson
Davolio
Buchanan
Suyama
Type Salesperson Sales
Produce Davolio >1000
Type Salesperson Sales
Produce
Davolio
>1000
Salesperson Sales
Davolio >3000
Page 2of 3 DPRODUCT
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
More than two sets of conditions for one column
To find rows that meet greater than two sets of conditions, include multiple columns with the same column heading. For example,
the following criteria range displays sales that are between 5,000 and 8,000 in addition to sales that are less than 500.
Conditions created as the result of a formula
You can use a calculated value that is the result of a formula (formula: A sequence of values, cell references, names, functions, or
operators in a cell that together produce a new value. A formula always begins with an equal sign (=).) as your criterion. When
you use a formula to create a criterion, do not use a column label for a criteria label; either keep the criteria label blank or use a
label that is not a column label in the list. For example, the following criteria range displays rows that have a value in column C
greater than the average of cells C7:C10.
Notes
The formula you use for a condition must use a relative reference (relative reference: In a formula, the address of a cell based
on the relative position of the cell that contains the formula and the cell referred to. If you copy the formula, the reference
automatically adjusts. A relative reference takes the form A1.) to refer to the column label (for example, Sales) or the
corresponding field in the first record. All other references in the formula must be absolute references (absolute cell reference:
In a formula, the exact address of a cell, regardless of the position of the cell that contains the formula. An absolute cell
reference takes the form $A$1.), and the formula must evaluate to TRUE or FALSE. I n the formula example, "C7" refers to the
field (column C) for the first record (row 7) of the list.
You can use a column label in the formula instead of a relative cell reference or a range name. When Microsoft Excel displays
an error value such as #NAME? or #VALUE! in the cell that contains the criterion, you can ignore this error because it does not
affect how the list is filtered.
When evaluating data, Microsoft Excel does not distinguish between uppercase and lowercase characters.
Buchanan >1500
Sales Sales
>5000 <8000
<500
=C7>AVERAGE($C$7:$C$10)
Page 3of 3 DPRODUCT
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
DSTDEV
See Also
Estimates the standard deviation of a population based on a sample by using the numbers in a column of a list or database that
match conditions you specify.
Syntax
DSTDEV(database,field,criteria)
Database is the range of cells that makes up the list or database. A database is a list of related data in which rows of related
information are records, and columns of data are fields. The first row of the list contains labels for each column.
Field indicates which column is used in the function. Field can be given as text with the column label enclosed between double
quotation marks, such as "Age" or "Yield," or as a number that represents the position of the column within the list: 1 for the first
column, 2 for the second column, and so on.
Criteria is the range of cells that contains the conditions you specify. You can use any range for the criteria argument, as long as it
includes at least one column label and at least one cell below the column label for specifying a condition for the column.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
5
6
7
8
9
10
A B C D E F
Tree Height Age Yield Profit Height
Apple >10 <16
Pear
Tree Height Age Yield Profit
Apple 18 20 14 105.00
Pear 12 12 10 96.00
Cherry 13 14 9 105.00
Apple 14 15 10 75.00
Pear 9 8 8 76.80
Apple 8 9 6 45.00
Formula Description (Result)
=DCOUNT
(A4:E10,"Age",A1:F2)
This function looks at the records of apple trees between a height of
10 and 16 and counts how many of the Age fields in those records
contain numbers. (1)
=DCOUNTA
(A4:E10,"Profit",A1:F2)
This function looks at the records of apple trees between a height of
10 and 16 and counts how many of the Profit fields in those records
are not blank. (1)
=DMAX
(A4:E10,"Profit",A1:A3)
The maximum profit of apple and pear trees. (105)
=DMI N
(A4:E10,"Profit",A1:B2)
The minimum profit of apple trees over 10 in height. (75)
=DSUM
(A4:E10,"Profit",A1:A2)
The total profit from apple trees. (225)
=DSUM
(A4:E10,"Profit",A1:F2)
The total profit from apple trees with a height between 10 and 16. (75)
=DPRODUCT
(A4:E10,"Yield",A1:B2)
The product of the yields from apple trees with a height greater than
10. (140)
=DAVERAGE
(A4:E10,"Yield",A1:B2)
The average yield of apple trees over 10 feet in height. (12)
=DAVERAGE
(A4:E10,3,A4:E10)
The average age of all trees in the database. (13)
=DSTDEV
(A4:E10,"Yield",A1:A3)
The estimated standard deviation in the yield of apple and pear trees if
the data in the database is only a sample of the total orchard
population. (2.97)
Page 1of 3 DSTDEV
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
Tips
You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the
column label for specifying the condition.
For example, if the range G1:G2 contains the column label Income in G1 and the amount 10,000 in G2, you could define the range
as MatchIncome and use that name as the criteria argument in the database functions.
Although the criteria range can be located anywhere on the worksheet, do not place the criteria range below the list. If you add
more information to the list by using the Form command on the Data menu, the new information is added to the first row below
the list. I f the row below the list is not blank, Microsoft Excel cannot add the new information.
Make sure the criteria range does not overlap the list.
To perform an operation on an entire column in a database, enter a blank line below the column labels in the criteria range.
Examples of criteria
Multiple conditions in a single column
If you have two or more conditions for a single column, type the criteria directly below each other in separate rows. For example,
the following criteria range displays the rows that contain either "Davolio," "Buchanan," or "Suyama" in the Salesperson column.
One condition in two or more columns
To find data that meets one condition in two or more columns, enter all the criteria in the same row of the criteria range. For
example, the following criteria range displays all rows that contain "Produce" in the Type column, "Davolio" in the Salesperson
column, and sales values greater than $1,000.
One condition in one column or another
To find data that meets either a condition in one column or a condition in another column, enter the criteria in different rows of
the criteria range. For example, the following criteria range displays all rows that contain either "Produce" in the Type column,
"Davolio" in the Salesperson column, or sales values greater than $1,000.
One of two sets of conditions for two columns
To find rows that meet one of two sets of conditions, where each set includes conditions for more than one column, type the
criteria in separate rows. For example, the following criteria range displays the rows that contain both "Davolio" in the Salesperson
column and sales values greater than $3,000, and also displays the rows for salesperson Buchanan with sales values greater than
$1,500.
=DSTDEVP
(A4:E10,"Yield",A1:A3)
The true standard deviation in the yield of apple and pear trees if the
data in the database is the entire population. (2.65)
=DVAR
(A4:E10,"Yield",A1:A3)
The estimated variance in the yield of apple and pear trees if the data
in the database is only a sample of the total orchard population. (8.8)
=DVARP
(A4:E10,"Yield",A1:A3)
The true variance in the yield of apple and pear trees if the data in the
database is the entire orchard population. ( 7.04)
=DGET
(A4:E10,"Yield",A1:A3)
Returns the #NUM! error value because more than one record meets
the criteria.
Salesperson
Davolio
Buchanan
Suyama
Type Salesperson Sales
Produce Davolio >1000
Type Salesperson Sales
Produce
Davolio
>1000
Salesperson Sales
Davolio >3000
Page 2of 3 DSTDEV
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
More than two sets of conditions for one column
To find rows that meet greater than two sets of conditions, include multiple columns with the same column heading. For example,
the following criteria range displays sales that are between 5,000 and 8,000 in addition to sales that are less than 500.
Conditions created as the result of a formula
You can use a calculated value that is the result of a formula (formula: A sequence of values, cell references, names, functions, or
operators in a cell that together produce a new value. A formula always begins with an equal sign (=).) as your criterion. When
you use a formula to create a criterion, do not use a column label for a criteria label; either keep the criteria label blank or use a
label that is not a column label in the list. For example, the following criteria range displays rows that have a value in column C
greater than the average of cells C7:C10.
Notes
The formula you use for a condition must use a relative reference (relative reference: In a formula, the address of a cell based
on the relative position of the cell that contains the formula and the cell referred to. If you copy the formula, the reference
automatically adjusts. A relative reference takes the form A1.) to refer to the column label (for example, Sales) or the
corresponding field in the first record. All other references in the formula must be absolute references (absolute cell reference:
In a formula, the exact address of a cell, regardless of the position of the cell that contains the formula. An absolute cell
reference takes the form $A$1.), and the formula must evaluate to TRUE or FALSE. I n the formula example, "C7" refers to the
field (column C) for the first record (row 7) of the list.
You can use a column label in the formula instead of a relative cell reference or a range name. When Microsoft Excel displays
an error value such as #NAME? or #VALUE! in the cell that contains the criterion, you can ignore this error because it does not
affect how the list is filtered.
When evaluating data, Microsoft Excel does not distinguish between uppercase and lowercase characters.
Buchanan >1500
Sales Sales
>5000 <8000
<500
=C7>AVERAGE($C$7:$C$10)
Page 3of 3 DSTDEV
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
DSTDEVP
See Also
Calculates the standard deviation of a population based on the entire population, using the numbers in a column of a list or
database that match conditions you specify.
Syntax
DSTDEVP(database,field,criteria)
Database is the range of cells that makes up the list or database. A database is a list of related data in which rows of related
information are records, and columns of data are fields. The first row of the list contains labels for each column.
Field indicates which column is used in the function. Field can be given as text with the column label enclosed between double
quotation marks, such as "Age" or "Yield," or as a number that represents the position of the column within the list: 1 for the first
column, 2 for the second column, and so on.
Criteria is the range of cells that contains the conditions you specify. You can use any range for the criteria argument, as long as it
includes at least one column label and at least one cell below the column label for specifying a condition for the column.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
5
6
7
8
9
10
A B C D E F
Tree Height Age Yield Profit Height
Apple >10 <16
Pear
Tree Height Age Yield Profit
Apple 18 20 14 105.00
Pear 12 12 10 96.00
Cherry 13 14 9 105.00
Apple 14 15 10 75.00
Pear 9 8 8 76.80
Apple 8 9 6 45.00
Formula Description (Result)
=DCOUNT
(A4:E10,"Age",A1:F2)
This function looks at the records of apple trees between a height of
10 and 16 and counts how many of the Age fields in those records
contain numbers. (1)
=DCOUNTA
(A4:E10,"Profit",A1:F2)
This function looks at the records of apple trees between a height of
10 and 16 and counts how many of the Profit fields in those records
are not blank. (1)
=DMAX
(A4:E10,"Profit",A1:A3)
The maximum profit of apple and pear trees. (105)
=DMI N
(A4:E10,"Profit",A1:B2)
The minimum profit of apple trees over 10 in height. (75)
=DSUM
(A4:E10,"Profit",A1:A2)
The total profit from apple trees. (225)
=DSUM
(A4:E10,"Profit",A1:F2)
The total profit from apple trees with a height between 10 and 16. (75)
=DPRODUCT
(A4:E10,"Yield",A1:B2)
The product of the yields from apple trees with a height greater than
10. (140)
=DAVERAGE
(A4:E10,"Yield",A1:B2)
The average yield of apple trees over 10 feet in height. (12)
=DAVERAGE
(A4:E10,3,A4:E10)
The average age of all trees in the database. (13)
=DSTDEV
(A4:E10,"Yield",A1:A3)
The estimated standard deviation in the yield of apple and pear trees if
the data in the database is only a sample of the total orchard
population. (2.97)
Page 1of 3 DSTDEVP
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
Tips
You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the
column label for specifying the condition.
For example, if the range G1:G2 contains the column label Income in G1 and the amount 10,000 in G2, you could define the range
as MatchIncome and use that name as the criteria argument in the database functions.
Although the criteria range can be located anywhere on the worksheet, do not place the criteria range below the list. If you add
more information to the list by using the Form command on the Data menu, the new information is added to the first row below
the list. I f the row below the list is not blank, Microsoft Excel cannot add the new information.
Make sure the criteria range does not overlap the list.
To perform an operation on an entire column in a database, enter a blank line below the column labels in the criteria range.
Examples of criteria
Multiple conditions in a single column
If you have two or more conditions for a single column, type the criteria directly below each other in separate rows. For example,
the following criteria range displays the rows that contain either "Davolio," "Buchanan," or "Suyama" in the Salesperson column.
One condition in two or more columns
To find data that meets one condition in two or more columns, enter all the criteria in the same row of the criteria range. For
example, the following criteria range displays all rows that contain "Produce" in the Type column, "Davolio" in the Salesperson
column, and sales values greater than $1,000.
One condition in one column or another
To find data that meets either a condition in one column or a condition in another column, enter the criteria in different rows of
the criteria range. For example, the following criteria range displays all rows that contain either "Produce" in the Type column,
"Davolio" in the Salesperson column, or sales values greater than $1,000.
One of two sets of conditions for two columns
To find rows that meet one of two sets of conditions, where each set includes conditions for more than one column, type the
criteria in separate rows. For example, the following criteria range displays the rows that contain both "Davolio" in the Salesperson
column and sales values greater than $3,000, and also displays the rows for salesperson Buchanan with sales values greater than
$1,500.
=DSTDEVP
(A4:E10,"Yield",A1:A3)
The true standard deviation in the yield of apple and pear trees if the
data in the database is the entire population. (2.65)
=DVAR
(A4:E10,"Yield",A1:A3)
The estimated variance in the yield of apple and pear trees if the data
in the database is only a sample of the total orchard population. (8.8)
=DVARP
(A4:E10,"Yield",A1:A3)
The true variance in the yield of apple and pear trees if the data in the
database is the entire orchard population. ( 7.04)
=DGET
(A4:E10,"Yield",A1:A3)
Returns the #NUM! error value because more than one record meets
the criteria.
Salesperson
Davolio
Buchanan
Suyama
Type Salesperson Sales
Produce Davolio >1000
Type Salesperson Sales
Produce
Davolio
>1000
Salesperson Sales
Davolio >3000
Page 2of 3 DSTDEVP
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
More than two sets of conditions for one column
To find rows that meet greater than two sets of conditions, include multiple columns with the same column heading. For example,
the following criteria range displays sales that are between 5,000 and 8,000 in addition to sales that are less than 500.
Conditions created as the result of a formula
You can use a calculated value that is the result of a formula (formula: A sequence of values, cell references, names, functions, or
operators in a cell that together produce a new value. A formula always begins with an equal sign (=).) as your criterion. When
you use a formula to create a criterion, do not use a column label for a criteria label; either keep the criteria label blank or use a
label that is not a column label in the list. For example, the following criteria range displays rows that have a value in column C
greater than the average of cells C7:C10.
Notes
The formula you use for a condition must use a relative reference (relative reference: In a formula, the address of a cell based
on the relative position of the cell that contains the formula and the cell referred to. If you copy the formula, the reference
automatically adjusts. A relative reference takes the form A1.) to refer to the column label (for example, Sales) or the
corresponding field in the first record. All other references in the formula must be absolute references (absolute cell reference:
In a formula, the exact address of a cell, regardless of the position of the cell that contains the formula. An absolute cell
reference takes the form $A$1.), and the formula must evaluate to TRUE or FALSE. I n the formula example, "C7" refers to the
field (column C) for the first record (row 7) of the list.
You can use a column label in the formula instead of a relative cell reference or a range name. When Microsoft Excel displays
an error value such as #NAME? or #VALUE! in the cell that contains the criterion, you can ignore this error because it does not
affect how the list is filtered.
When evaluating data, Microsoft Excel does not distinguish between uppercase and lowercase characters.
Buchanan >1500
Sales Sales
>5000 <8000
<500
=C7>AVERAGE($C$7:$C$10)
Page 3of 3 DSTDEVP
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
DSUM
See Also
Adds the numbers in a column of a list or database that match conditions you specify.
Syntax
DSUM(database,field,criteria)
Database is the range of cells that makes up the list or database. A database is a list of related data in which rows of related
information are records, and columns of data are fields. The first row of the list contains labels for each column.
Field indicates which column is used in the function. Field can be given as text with the column label enclosed between double
quotation marks, such as "Age" or "Yield," or as a number that represents the position of the column within the list: 1 for the first
column, 2 for the second column, and so on.
Criteria is the range of cells that contains the conditions you specify. You can use any range for the criteria argument, as long as it
includes at least one column label and at least one cell below the column label for specifying a condition for the column.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
5
6
7
8
9
10
A B C D E F
Tree Height Age Yield Profit Height
Apple >10 <16
Pear
Tree Height Age Yield Profit
Apple 18 20 14 105.00
Pear 12 12 10 96.00
Cherry 13 14 9 105.00
Apple 14 15 10 75.00
Pear 9 8 8 76.80
Apple 8 9 6 45.00
Formula Description (Result)
=DCOUNT
(A4:E10,"Age",A1:F2)
This function looks at the records of apple trees between a height of
10 and 16 and counts how many of the Age fields in those records
contain numbers. (1)
=DCOUNTA
(A4:E10,"Profit",A1:F2)
This function looks at the records of apple trees between a height of
10 and 16 and counts how many of the Profit fields in those records
are not blank. (1)
=DMAX
(A4:E10,"Profit",A1:A3)
The maximum profit of apple and pear trees. (105)
=DMI N
(A4:E10,"Profit",A1:B2)
The minimum profit of apple trees over 10 in height. (75)
=DSUM
(A4:E10,"Profit",A1:A2)
The total profit from apple trees. (225)
=DSUM
(A4:E10,"Profit",A1:F2)
The total profit from apple trees with a height between 10 and 16. (75)
=DPRODUCT
(A4:E10,"Yield",A1:B2)
The product of the yields from apple trees with a height greater than
10. (140)
=DAVERAGE
(A4:E10,"Yield",A1:B2)
The average yield of apple trees over 10 feet in height. (12)
=DAVERAGE
(A4:E10,3,A4:E10)
The average age of all trees in the database. (13)
=DSTDEV
(A4:E10,"Yield",A1:A3)
The estimated standard deviation in the yield of apple and pear trees if
the data in the database is only a sample of the total orchard
population. (2.97)
Page 1of 3 DSUM
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
Tips
You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the
column label for specifying the condition.
For example, if the range G1:G2 contains the column label Income in G1 and the amount 10,000 in G2, you could define the range
as MatchIncome and use that name as the criteria argument in the database functions.
Although the criteria range can be located anywhere on the worksheet, do not place the criteria range below the list. If you add
more information to the list by using the Form command on the Data menu, the new information is added to the first row below
the list. I f the row below the list is not blank, Microsoft Excel cannot add the new information.
Make sure the criteria range does not overlap the list.
To perform an operation on an entire column in a database, enter a blank line below the column labels in the criteria range.
Examples of criteria
Multiple conditions in a single column
If you have two or more conditions for a single column, type the criteria directly below each other in separate rows. For example,
the following criteria range displays the rows that contain either "Davolio," "Buchanan," or "Suyama" in the Salesperson column.
One condition in two or more columns
To find data that meets one condition in two or more columns, enter all the criteria in the same row of the criteria range. For
example, the following criteria range displays all rows that contain "Produce" in the Type column, "Davolio" in the Salesperson
column, and sales values greater than $1,000.
One condition in one column or another
To find data that meets either a condition in one column or a condition in another column, enter the criteria in different rows of
the criteria range. For example, the following criteria range displays all rows that contain either "Produce" in the Type column,
"Davolio" in the Salesperson column, or sales values greater than $1,000.
One of two sets of conditions for two columns
To find rows that meet one of two sets of conditions, where each set includes conditions for more than one column, type the
criteria in separate rows. For example, the following criteria range displays the rows that contain both "Davolio" in the Salesperson
column and sales values greater than $3,000, and also displays the rows for salesperson Buchanan with sales values greater than
$1,500.
=DSTDEVP
(A4:E10,"Yield",A1:A3)
The true standard deviation in the yield of apple and pear trees if the
data in the database is the entire population. (2.65)
=DVAR
(A4:E10,"Yield",A1:A3)
The estimated variance in the yield of apple and pear trees if the data
in the database is only a sample of the total orchard population. (8.8)
=DVARP
(A4:E10,"Yield",A1:A3)
The true variance in the yield of apple and pear trees if the data in the
database is the entire orchard population. ( 7.04)
=DGET
(A4:E10,"Yield",A1:A3)
Returns the #NUM! error value because more than one record meets
the criteria.
Salesperson
Davolio
Buchanan
Suyama
Type Salesperson Sales
Produce Davolio >1000
Type Salesperson Sales
Produce
Davolio
>1000
Salesperson Sales
Davolio >3000
Page 2of 3 DSUM
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
More than two sets of conditions for one column
To find rows that meet greater than two sets of conditions, include multiple columns with the same column heading. For example,
the following criteria range displays sales that are between 5,000 and 8,000 in addition to sales that are less than 500.
Conditions created as the result of a formula
You can use a calculated value that is the result of a formula (formula: A sequence of values, cell references, names, functions, or
operators in a cell that together produce a new value. A formula always begins with an equal sign (=).) as your criterion. When
you use a formula to create a criterion, do not use a column label for a criteria label; either keep the criteria label blank or use a
label that is not a column label in the list. For example, the following criteria range displays rows that have a value in column C
greater than the average of cells C7:C10.
Notes
The formula you use for a condition must use a relative reference (relative reference: In a formula, the address of a cell based
on the relative position of the cell that contains the formula and the cell referred to. If you copy the formula, the reference
automatically adjusts. A relative reference takes the form A1.) to refer to the column label (for example, Sales) or the
corresponding field in the first record. All other references in the formula must be absolute references (absolute cell reference:
In a formula, the exact address of a cell, regardless of the position of the cell that contains the formula. An absolute cell
reference takes the form $A$1.), and the formula must evaluate to TRUE or FALSE. I n the formula example, "C7" refers to the
field (column C) for the first record (row 7) of the list.
You can use a column label in the formula instead of a relative cell reference or a range name. When Microsoft Excel displays
an error value such as #NAME? or #VALUE! in the cell that contains the criterion, you can ignore this error because it does not
affect how the list is filtered.
When evaluating data, Microsoft Excel does not distinguish between uppercase and lowercase characters.
Buchanan >1500
Sales Sales
>5000 <8000
<500
=C7>AVERAGE($C$7:$C$10)
Page 3of 3 DSUM
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
DVAR
See Also
Estimates the variance of a population based on a sample by using the numbers in a column of a list or database that match
conditions you specify.
Syntax
DVAR(database,field,criteria)
Database is the range of cells that makes up the list or database. A database is a list of related data in which rows of related
information are records, and columns of data are fields. The first row of the list contains labels for each column.
Field indicates which column is used in the function. Field can be given as text with the column label enclosed between double
quotation marks, such as "Age" or "Yield," or as a number that represents the position of the column within the list: 1 for the first
column, 2 for the second column, and so on.
Criteria is the range of cells that contains the conditions you specify. You can use any range for the criteria argument, as long as it
includes at least one column label and at least one cell below the column label for specifying a condition for the column.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
5
6
7
8
9
10
A B C D E F
Tree Height Age Yield Profit Height
Apple >10 <16
Pear
Tree Height Age Yield Profit
Apple 18 20 14 105.00
Pear 12 12 10 96.00
Cherry 13 14 9 105.00
Apple 14 15 10 75.00
Pear 9 8 8 76.80
Apple 8 9 6 45.00
Formula Description (Result)
=DCOUNT
(A4:E10,"Age",A1:F2)
This function looks at the records of apple trees between a height of
10 and 16 and counts how many of the Age fields in those records
contain numbers. (1)
=DCOUNTA
(A4:E10,"Profit",A1:F2)
This function looks at the records of apple trees between a height of
10 and 16 and counts how many of the Profit fields in those records
are not blank. (1)
=DMAX
(A4:E10,"Profit",A1:A3)
The maximum profit of apple and pear trees. (105)
=DMI N
(A4:E10,"Profit",A1:B2)
The minimum profit of apple trees over 10 in height. (75)
=DSUM
(A4:E10,"Profit",A1:A2)
The total profit from apple trees. (225)
=DSUM
(A4:E10,"Profit",A1:F2)
The total profit from apple trees with a height between 10 and 16. (75)
=DPRODUCT
(A4:E10,"Yield",A1:B2)
The product of the yields from apple trees with a height greater than
10. (140)
=DAVERAGE
(A4:E10,"Yield",A1:B2)
The average yield of apple trees over 10 feet in height. (12)
=DAVERAGE
(A4:E10,3,A4:E10)
The average age of all trees in the database. (13)
=DSTDEV
(A4:E10,"Yield",A1:A3)
The estimated standard deviation in the yield of apple and pear trees if
the data in the database is only a sample of the total orchard
population. (2.97)
Page 1of 3 DVAR
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
Tips
You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the
column label for specifying the condition.
For example, if the range G1:G2 contains the column label Income in G1 and the amount 10,000 in G2, you could define the range
as MatchIncome and use that name as the criteria argument in the database functions.
Although the criteria range can be located anywhere on the worksheet, do not place the criteria range below the list. If you add
more information to the list by using the Form command on the Data menu, the new information is added to the first row below
the list. I f the row below the list is not blank, Microsoft Excel cannot add the new information.
Make sure the criteria range does not overlap the list.
To perform an operation on an entire column in a database, enter a blank line below the column labels in the criteria range.
Examples of criteria
Multiple conditions in a single column
If you have two or more conditions for a single column, type the criteria directly below each other in separate rows. For example,
the following criteria range displays the rows that contain either "Davolio," "Buchanan," or "Suyama" in the Salesperson column.
One condition in two or more columns
To find data that meets one condition in two or more columns, enter all the criteria in the same row of the criteria range. For
example, the following criteria range displays all rows that contain "Produce" in the Type column, "Davolio" in the Salesperson
column, and sales values greater than $1,000.
One condition in one column or another
To find data that meets either a condition in one column or a condition in another column, enter the criteria in different rows of
the criteria range. For example, the following criteria range displays all rows that contain either "Produce" in the Type column,
"Davolio" in the Salesperson column, or sales values greater than $1,000.
One of two sets of conditions for two columns
To find rows that meet one of two sets of conditions, where each set includes conditions for more than one column, type the
criteria in separate rows. For example, the following criteria range displays the rows that contain both "Davolio" in the Salesperson
column and sales values greater than $3,000, and also displays the rows for salesperson Buchanan with sales values greater than
$1,500.
=DSTDEVP
(A4:E10,"Yield",A1:A3)
The true standard deviation in the yield of apple and pear trees if the
data in the database is the entire population. (2.65)
=DVAR
(A4:E10,"Yield",A1:A3)
The estimated variance in the yield of apple and pear trees if the data
in the database is only a sample of the total orchard population. (8.8)
=DVARP
(A4:E10,"Yield",A1:A3)
The true variance in the yield of apple and pear trees if the data in the
database is the entire orchard population. ( 7.04)
=DGET
(A4:E10,"Yield",A1:A3)
Returns the #NUM! error value because more than one record meets
the criteria.
Salesperson
Davolio
Buchanan
Suyama
Type Salesperson Sales
Produce Davolio >1000
Type Salesperson Sales
Produce
Davolio
>1000
Salesperson Sales
Davolio >3000
Page 2of 3 DVAR
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
More than two sets of conditions for one column
To find rows that meet greater than two sets of conditions, include multiple columns with the same column heading. For example,
the following criteria range displays sales that are between 5,000 and 8,000 in addition to sales that are less than 500.
Conditions created as the result of a formula
You can use a calculated value that is the result of a formula (formula: A sequence of values, cell references, names, functions, or
operators in a cell that together produce a new value. A formula always begins with an equal sign (=).) as your criterion. When
you use a formula to create a criterion, do not use a column label for a criteria label; either keep the criteria label blank or use a
label that is not a column label in the list. For example, the following criteria range displays rows that have a value in column C
greater than the average of cells C7:C10.
Notes
The formula you use for a condition must use a relative reference (relative reference: In a formula, the address of a cell based
on the relative position of the cell that contains the formula and the cell referred to. If you copy the formula, the reference
automatically adjusts. A relative reference takes the form A1.) to refer to the column label (for example, Sales) or the
corresponding field in the first record. All other references in the formula must be absolute references (absolute cell reference:
In a formula, the exact address of a cell, regardless of the position of the cell that contains the formula. An absolute cell
reference takes the form $A$1.), and the formula must evaluate to TRUE or FALSE. I n the formula example, "C7" refers to the
field (column C) for the first record (row 7) of the list.
You can use a column label in the formula instead of a relative cell reference or a range name. When Microsoft Excel displays
an error value such as #NAME? or #VALUE! in the cell that contains the criterion, you can ignore this error because it does not
affect how the list is filtered.
When evaluating data, Microsoft Excel does not distinguish between uppercase and lowercase characters.
Buchanan >1500
Sales Sales
>5000 <8000
<500
=C7>AVERAGE($C$7:$C$10)
Page 3of 3 DVAR
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
DVARP
See Also
Calculates the variance of a population based on the entire population by using the numbers in a column of a list or database that
match conditions you specify.
Syntax
DVARP(database,field,criteria)
Database is the range of cells that makes up the list or database. A database is a list of related data in which rows of related
information are records, and columns of data are fields. The first row of the list contains labels for each column.
Field indicates which column is used in the function. Field can be given as text with the column label enclosed between double
quotation marks, such as "Age" or "Yield," or as a number that represents the position of the column within the list: 1 for the first
column, 2 for the second column, and so on.
Criteria is the range of cells that contains the conditions you specify. You can use any range for the criteria argument, as long as it
includes at least one column label and at least one cell below the column label for specifying a condition for the column.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
5
6
7
8
9
10
A B C D E F
Tree Height Age Yield Profit Height
Apple >10 <16
Pear
Tree Height Age Yield Profit
Apple 18 20 14 105.00
Pear 12 12 10 96.00
Cherry 13 14 9 105.00
Apple 14 15 10 75.00
Pear 9 8 8 76.80
Apple 8 9 6 45.00
Formula Description (Result)
=DCOUNT
(A4:E10,"Age",A1:F2)
This function looks at the records of apple trees between a height of
10 and 16 and counts how many of the Age fields in those records
contain numbers. (1)
=DCOUNTA
(A4:E10,"Profit",A1:F2)
This function looks at the records of apple trees between a height of
10 and 16 and counts how many of the Profit fields in those records
are not blank. (1)
=DMAX
(A4:E10,"Profit",A1:A3)
The maximum profit of apple and pear trees. (105)
=DMI N
(A4:E10,"Profit",A1:B2)
The minimum profit of apple trees over 10 in height. (75)
=DSUM
(A4:E10,"Profit",A1:A2)
The total profit from apple trees. (225)
=DSUM
(A4:E10,"Profit",A1:F2)
The total profit from apple trees with a height between 10 and 16. (75)
=DPRODUCT
(A4:E10,"Yield",A1:B2)
The product of the yields from apple trees with a height greater than
10. (140)
=DAVERAGE
(A4:E10,"Yield",A1:B2)
The average yield of apple trees over 10 feet in height. (12)
=DAVERAGE
(A4:E10,3,A4:E10)
The average age of all trees in the database. (13)
=DSTDEV
(A4:E10,"Yield",A1:A3)
The estimated standard deviation in the yield of apple and pear trees if
the data in the database is only a sample of the total orchard
population. (2.97)
Page 1of 3 DVARP
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
Tips
You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the
column label for specifying the condition.
For example, if the range G1:G2 contains the column label Income in G1 and the amount 10,000 in G2, you could define the range
as MatchIncome and use that name as the criteria argument in the database functions.
Although the criteria range can be located anywhere on the worksheet, do not place the criteria range below the list. If you add
more information to the list by using the Form command on the Data menu, the new information is added to the first row below
the list. I f the row below the list is not blank, Microsoft Excel cannot add the new information.
Make sure the criteria range does not overlap the list.
To perform an operation on an entire column in a database, enter a blank line below the column labels in the criteria range.
Examples of criteria
Multiple conditions in a single column
If you have two or more conditions for a single column, type the criteria directly below each other in separate rows. For example,
the following criteria range displays the rows that contain either "Davolio," "Buchanan," or "Suyama" in the Salesperson column.
One condition in two or more columns
To find data that meets one condition in two or more columns, enter all the criteria in the same row of the criteria range. For
example, the following criteria range displays all rows that contain "Produce" in the Type column, "Davolio" in the Salesperson
column, and sales values greater than $1,000.
One condition in one column or another
To find data that meets either a condition in one column or a condition in another column, enter the criteria in different rows of
the criteria range. For example, the following criteria range displays all rows that contain either "Produce" in the Type column,
"Davolio" in the Salesperson column, or sales values greater than $1,000.
One of two sets of conditions for two columns
To find rows that meet one of two sets of conditions, where each set includes conditions for more than one column, type the
criteria in separate rows. For example, the following criteria range displays the rows that contain both "Davolio" in the Salesperson
column and sales values greater than $3,000, and also displays the rows for salesperson Buchanan with sales values greater than
$1,500.
=DSTDEVP
(A4:E10,"Yield",A1:A3)
The true standard deviation in the yield of apple and pear trees if the
data in the database is the entire population. (2.65)
=DVAR
(A4:E10,"Yield",A1:A3)
The estimated variance in the yield of apple and pear trees if the data
in the database is only a sample of the total orchard population. (8.8)
=DVARP
(A4:E10,"Yield",A1:A3)
The true variance in the yield of apple and pear trees if the data in the
database is the entire orchard population. ( 7.04)
=DGET
(A4:E10,"Yield",A1:A3)
Returns the #NUM! error value because more than one record meets
the criteria.
Salesperson
Davolio
Buchanan
Suyama
Type Salesperson Sales
Produce Davolio >1000
Type Salesperson Sales
Produce
Davolio
>1000
Salesperson Sales
Davolio >3000
Page 2of 3 DVARP
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
More than two sets of conditions for one column
To find rows that meet greater than two sets of conditions, include multiple columns with the same column heading. For example,
the following criteria range displays sales that are between 5,000 and 8,000 in addition to sales that are less than 500.
Conditions created as the result of a formula
You can use a calculated value that is the result of a formula (formula: A sequence of values, cell references, names, functions, or
operators in a cell that together produce a new value. A formula always begins with an equal sign (=).) as your criterion. When
you use a formula to create a criterion, do not use a column label for a criteria label; either keep the criteria label blank or use a
label that is not a column label in the list. For example, the following criteria range displays rows that have a value in column C
greater than the average of cells C7:C10.
Notes
The formula you use for a condition must use a relative reference (relative reference: In a formula, the address of a cell based
on the relative position of the cell that contains the formula and the cell referred to. If you copy the formula, the reference
automatically adjusts. A relative reference takes the form A1.) to refer to the column label (for example, Sales) or the
corresponding field in the first record. All other references in the formula must be absolute references (absolute cell reference:
In a formula, the exact address of a cell, regardless of the position of the cell that contains the formula. An absolute cell
reference takes the form $A$1.), and the formula must evaluate to TRUE or FALSE. I n the formula example, "C7" refers to the
field (column C) for the first record (row 7) of the list.
You can use a column label in the formula instead of a relative cell reference or a range name. When Microsoft Excel displays
an error value such as #NAME? or #VALUE! in the cell that contains the criterion, you can ignore this error because it does not
affect how the list is filtered.
When evaluating data, Microsoft Excel does not distinguish between uppercase and lowercase characters.
Buchanan >1500
Sales Sales
>5000 <8000
<500
=C7>AVERAGE($C$7:$C$10)
Page 3of 3 DVARP
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
DATE
See Also
Returns the sequential serial number that represents a particular date. If the cell format was General before the function was
entered, the result is formatted as a date.
Syntax
DATE(year,month,day)
Year The year argument can be one to four digits. Microsoft Excel interprets the year argument according to the date system you are
using. By default, Excel for Windows uses the 1900 date system; Excel for the Macintosh uses the 1904 date system.
For the 1900 date system
I f year is between 0 (zero) and 1899 (inclusive), Excel adds that value to 1900 to calculate the year. For example, DATE
( 108, 1, 2) returns J anuary 2, 2008 (1900+108).
I f year is between 1900 and 9999 (inclusive), Excel uses that value as the year. For example, DATE( 2008, 1, 2) returns
J anuary 2, 2008.
I f year is less than 0 or is 10000 or greater, Excel returns the #NUM! error value.
For the 1904 date system
I f year is between 4 and 1899 (inclusive), Excel adds that value to 1900 to calculate the year. For example, DATE( 108, 1, 2)
returns J anuary 2, 2008 (1900+108).
I f year is between 1904 and 9999 (inclusive), Excel uses that value as the year. For example, DATE( 2008, 1, 2) returns
J anuary 2, 2008.
I f year is less than 4 or is 10000 or greater or if year is between 1900 and 1903 (inclusive), Excel returns the #NUM! error value.
Month is a number representing the month of the year. If month is greater than 12, month adds that number of months to the first
month in the year specified. For example, DATE( 2008, 14, 2) returns the serial number representing February 2, 2009.
Day is a number representing the day of the month. If day is greater than the number of days in the month specified, day adds that
number of days to the first day in the month. For example, DATE( 2008, 1, 35) returns the serial number representing February
4, 2008.
Remarks
Excel stores dates as sequential serial numbers so they can be used in calculations. By default, J anuary 1, 1900 is serial number 1,
and J anuary 1, 2008 is serial number 39448 because it is 39,448 days after J anuary 1, 1900. Excel for the Macintosh uses a
different date system as its default.
The DATE function is most useful in formulas where year, month, and day are formulas, not constants.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
Note To view the number as a serial number, select the cell and click Cells on the Format menu. Click the Number tab, and then
click General in the Category box.
1
2
A B C
Year Month Day
2008 1 1
Formula Description (Result)
=DATE(A2,B2,C2) Serial date for the date above, using the 1900 date system (1/1/2008 or 39448)
Page 1of 1 DATE
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
DATEVALUE
See Also
Returns the serial number of the date represented by date_text. Use DATEVALUE to convert a date represented by text to a serial
number.
Syntax
DATEVALUE(date_text)
Date_text is text that represents a date in a Microsoft Excel date format. For example, "1/30/2008" or "30-J an-2008" are text strings
within quotation marks that represent dates. Using the default date system in Excel for Windows, date_text must represent a date from
J anuary 1, 1900, to December 31, 9999. Using the default date system in Excel for the Macintosh, date_text must represent a date
from J anuary 1, 1904, to December 31, 9999. DATEVALUE returns the #VALUE! error value if date_text is out of this range.
If the year portion of date_text is omitted, DATEVALUE uses the current year from your computer's built-in clock. Time information in
date_text is ignored.
Remarks
Excel stores dates as sequential serial numbers so they can be used in calculations. By default, J anuary 1, 1900 is serial number 1,
and J anuary 1, 2008 is serial number 39448 because it is 39,448 days after J anuary 1, 1900. Excel for the Macintosh uses a
different date system as its default.
Most functions automatically convert date values to serial numbers.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
Note To view the number as a date, select the cell and click Cells on the Format menu. Click the Number tab, and then click Date
in the Category box.
1
2
3
4
5
A B
Formula Description (Result)
=DATEVALUE
("8/22/2008")
Serial number of the text date, using the 1900 date system (39682)
=DATEVALUE("22-AUG-
2008")
Serial number of the text date, using the 1900 date system (39682)
=DATEVALUE
("2008/02/23")
Serial number of the text date, using the 1900 date system (39501)
=DATEVALUE("5-J UL") Serial number of the text date, using the 1900 date system, and assuming the computer's built-in
clock is set to 2008 (39634)
Page 1of 1 DATEVALUE
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
DAY
See Also
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)
Serial_number is the date of the day you are trying to find. Dates should be entered by using the DATE function, or as results of
other formulas or functions. For example, use DATE(2008,5,23) for the 23rd day of May, 2008. Problems can occur if dates are entered
as text.
Remarks
Microsoft Excel stores dates as sequential serial numbers so they can be used in calculations. By default, J anuary 1, 1900 is serial
number 1, and J anuary 1, 2008 is serial number 39448 because it is 39,448 days after J anuary 1, 1900. Microsoft Excel for the
Macintosh uses a different date system as its default.
Values returned by the YEAR, MONTH and DAY functions will be Gregorian values regardless of the display format for the supplied date
value. For example, if the display format of the supplied date is Hijri, the returned values for the YEAR, MONTH and DAY functions will
be values associated with the equivalent Gregorian date.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
A
Date
15-Apr-2008
Formula Description (Result)
=DAY(A2) Day of the date above (15)
Page 1of 1 DAY
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
DAYS360
See Also
Returns the number of days between two dates based on a 360-day year (twelve 30-day months), which is used in some
accounting calculations. Use this function to help compute payments if your accounting system is based on twelve 30-day months.
Syntax
DAYS360(start_date,end_date,method)
Start_date and end_date are the two dates between which you want to know the number of days. If start_date occurs after
end_date, DAYS360 returns a negative number. Dates should be entered by using the DATE function, or as results of other formulas or
functions. For example, use DATE(2008,5,23) for the 23rd day of May, 2008. Problems can occur if dates are entered as text.
Method is a logical value that specifies whether to use the U.S. or European method in the calculation.
Remark
Microsoft Excel stores dates as sequential serial numbers so they can be used in calculations. By default, J anuary 1, 1900 is serial
number 1, and J anuary 1, 2008 is serial number 39448 because it is 39,448 days after J anuary 1, 1900. Microsoft Excel for the
Macintosh uses a different date system as its default.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
Method Defined
FALSE or
omitted
U.S. (NASD) method. If the starting date is the 31st of a month, it becomes equal to the 30th of the same month. If the
ending date is the 31st of a month and the starting date is earlier than the 30th of a month, the ending date becomes
equal to the 1st of the next month; otherwise the ending date becomes equal to the 30th of the same month.
TRUE European method. Starting dates and ending dates that occur on the 31st of a month become equal to the 30th of the
same month.
1
2
3
A
Dates
1/30/2008
2/1/2008
Formula Description (Result)
=DAYS360(A2,A3) Number of days between the two dates above, based on a 360-day year (1)
Page 1of 1 DAYS360
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
EDATE
See Also
Returns the serial number that represents the date that is the indicated number of months before or after a specified date (the
start_date). Use EDATE to calculate maturity dates or due dates that fall on the same day of the month as the date of issue.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
EDATE(start_date,months)
Start_date is a date that represents the start date. Dates should be entered by using the DATE function, or as results of other
formulas or functions. For example, use DATE(2008,5,23) for the 23rd day of May, 2008. Problems can occur if dates are entered as
text.
Months is the number of months before or after start_date. A positive value for months yields a future date; a negative value yields a
past date.
Remarks
Microsoft Excel stores dates as sequential serial numbers so they can be used in calculations. By default, J anuary 1, 1900 is serial
number 1, and J anuary 1, 2008 is serial number 39448 because it is 39,448 days after J anuary 1, 1900. Microsoft Excel for the
Macintosh uses a different date system as its default.
If start_date is not a valid date, EDATE returns the #VALUE! error value.
If months is not an integer, it is truncated.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
Note To view the number as a date, select the cell and click Cells on the Format menu. Click the Number tab, and then click Date
in the Category box.
1
2
A
Date
01/15/2008
Formula Description (Result)
=EDATE(A2,1) The date, one month after the date above (February 15, 2008)
=EDATE(A2,-1) The date, one month before the date above (December 15, 2007)
=EDATE(A2,2) The date, two months after the date above (March 15, 2008)
Page 1of 1 EDATE
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
EOMONTH
See Also
Returns the serial number for the last day of the month that is the indicated number of months before or after start_date. Use
EOMONTH to calculate maturity dates or due dates that fall on the last day of the month.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
EOMONTH(start_date,months)
Start_date is a date that represents the starting date. Dates should be entered by using the DATE function, or as results of other
formulas or functions. For example, use DATE(2008,5,23) for the 23rd day of May, 2008. Problems can occur if dates are entered as
text.
Months is the number of months before or after start_date. A positive value for months yields a future date; a negative value yields a
past date.
If months is not an integer, it is truncated.
Remarks
Microsoft Excel stores dates as sequential serial numbers so they can be used in calculations. By default, J anuary 1, 1900 is serial
number 1, and J anuary 1, 2008 is serial number 39448 because it is 39,448 days after J anuary 1, 1900. Microsoft Excel for the
Macintosh uses a different date system as its default.
If start_date is not a valid date, EOMONTH returns the #NUM! error value.
If start_date plus months yields an invalid date, EOMONTH returns the #NUM! error value.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
Note To view the number as a date, select the cell and click Cells on the Format menu. Click the Number tab, and then click Date
in the Category box.
1
2
A
Date
01/01/2008
Formula Description (Result)
=EOMONTH(A2,1) Date of the last day of the month, one month after the date above (February 29, 2008)
=EOMONTH(A2,-3) Date of the last day of the month, three months before the date above (October 31, 2007)
Page 1of 1 EOMONTH
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
HOUR
See Also
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)
Serial_number is the time that contains the hour you want to find. Times may be entered as text strings within quotation marks (for
example, "6:45 PM"), as decimal numbers (for example, 0.78125, which represents 6:45 PM), or as results of other formulas or
functions (for example, TIMEVALUE("6:45 PM")).
Remark
Microsoft Excel for Windows and Excel for the Macintosh use different date systems as their defaults. Time values are a portion of a
date value and represented by a decimal number (for example, 12:00 PM is represented as 0.5 because it is half of a day).
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
A
Time
3:30:30 AM
3:30:30 PM
15:30
Formula Description (Result)
=HOUR(A2) Hour of first time (3)
=HOUR(A3) Hour of second time (15)
=HOUR(A4) Hour of third time (15)
Page 1of 1 HOUR
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
MI NUTE
See Also
Returns the minutes of a time value. The minute is given as an integer, ranging from 0 to 59.
Syntax
MI NUTE(serial_number)
Serial_number is the time that contains the minute you want to find. Times may be entered as text strings within quotation marks
(for example, "6:45 PM"), as decimal numbers (for example, 0.78125, which represents 6:45 PM), or as results of other formulas or
functions (for example, TIMEVALUE("6:45 PM")).
Remarks
Microsoft Excel for Windows and Microsoft Excel for the Macintosh use different date systems as their default. Time values are a
portion of a date value and represented by a decimal number (for example, 12:00 PM is represented as 0.5, since it is half of a day).
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
A
Time
4:48:00 PM
Formula Description (Result)
=MINUTE(A2) Minutes of the time above (48)
Page 1of 1 MINUTE
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
MONTH
See Also
Returns the month of a date represented by a serial number. The month is given as an integer, ranging from 1 (J anuary) to 12
(December).
Syntax
MONTH(serial_number)
Serial_number is the date of the month you are trying to find. Dates should be entered by using the DATE function, or as results of
other formulas or functions. For example, use DATE(2008,5,23) for the 23rd day of May, 2008. Problems can occur if dates are entered
as text.
Remarks
Microsoft Excel stores dates as sequential serial numbers so they can be used in calculations. By default, J anuary 1, 1900 is serial
number 1, and J anuary 1, 2008 is serial number 39448 because it is 39,448 days after J anuary 1, 1900. Microsoft Excel for the
Macintosh uses a different date system as its default.
Values returned by the YEAR, MONTH and DAY functions will be Gregorian values regardless of the display format for the supplied date
value. For example, if the display format of the supplied date is Hijri (Hijri calendar: The lunar calendar that is used in Islamic regions.),
the returned values for the YEAR, MONTH and DAY functions will be values associated with the equivalent Gregorian date.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
A
Date
15-Apr-2008
Formula Description (Result)
=MONTH(A2) Month of the date above (4)
Page 1of 1 MONTH
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
NETWORKDAYS
See Also
Returns the number of whole working days between start_date and end_date. Working days exclude weekends and any dates
identified in holidays. Use NETWORKDAYS to calculate employee benefits that accrue based on the number of days worked during
a specific term.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
NETWORKDAYS(start_date,end_date,holidays)
Important Dates should be entered by using the DATE function, or as results of other formulas or functions. For example, use DATE
(2008,5,23) for the 23rd day of May, 2008. Problems can occur if dates are entered as text.
Start_date is a date that represents the start date.
End_date is a date that represents the end date.
Holidays is an optional range of one or more dates to exclude from the working calendar, such as state and federal holidays and
floating holidays. The list can be either a range of cells that contains the dates or an array constant (array: Used to build single
formulas that produce multiple results or that operate on a group of arguments that are arranged in rows and columns. An array range
shares a common formula; an array constant is a group of constants used as an argument.) of the serial numbers that represent the
dates.
Remarks
Microsoft Excel stores dates as sequential serial numbers so they can be used in calculations. By default, J anuary 1, 1900 is serial
number 1, and J anuary 1, 2008 is serial number 39448 because it is 39,448 days after J anuary 1, 1900. Microsoft Excel for the
Macintosh uses a different date system as its default.
If any argument is not a valid date, NETWORKDAYS returns the #VALUE! error value.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
Note To convert the range of cells used for holidays in the last example into an array constant, select reference A4:A6 in the formula
and then press F9.
1
2
3
4
5
6
A B
Date Description
10/01/2008 Start date of project
3/01/2009 End date of project
11/26/2008 Holiday
12/4/2008 Holiday
1/21/2009 Holiday
Formula Description (Result)
=NETWORKDAYS(A2,A3) Number of workdays between the start and end date above (108)
=NETWORKDAYS(A2,A3,A4) Number of workdays between the start and end date above, excluding the first holiday (107)
=NETWORKDAYS
(A2,A3,A4:A6)
Number of workdays between the start and end date above, excluding every holiday above
(105)
Page 1of 1 NETWORKDAYS
15/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
NOW
See Also
Returns the serial number of the current date and time. If the cell format was General before the function was entered, the result is
formatted as a date.
Syntax
NOW( )
Remarks
Microsoft Excel stores dates as sequential serial numbers so they can be used in calculations. By default, J anuary 1, 1900 is serial
number 1, and J anuary 1, 2008 is serial number 39448 because it is 39,448 days after J anuary 1, 1900. Microsoft Excel for the
Macintosh uses a different date system as its default.
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.
The NOW function changes only when the worksheet is calculated or when a macro that contains the function is run. It is not
updated continuously.
Page 1of 1 NOW
15/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
SECOND
See Also
Returns the seconds of a time value. The second is given as an integer in the range 0 (zero) to 59.
Syntax
SECOND(serial_number)
Serial_number is the time that contains the seconds you want to find. Times may be entered as text strings within quotation marks
(for example, "6:45 PM"), as decimal numbers (for example, 0.78125, which represents 6:45 PM), or as results of other formulas or
functions (for example, TIMEVALUE("6:45 PM")).
Remark
Microsoft Excel for Windows and Microsoft Excel for the Macintosh use different date systems as their default. Time values are a
portion of a date value and represented by a decimal number (for example, 12:00 PM is represented as 0.5 because it is half of a day).
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
A
Time
4:48:18 PM
4:48 PM
Formula Description
=SECOND(A2) Seconds in the first time (18)
=SECOND(A3) Seconds in the second time (0)
Page 1of 1 SECOND
15/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
TI ME
See Also
Returns the decimal number for a particular time. If the cell format was General before the function was entered, the result is
formatted as a date.
The decimal number returned by TIME is a value ranging from 0 (zero) to 0.99999999, representing the times from 0:00:00 (12:00:00
AM) to 23:59:59 (11:59:59 P.M.).
Syntax
TI ME(hour,minute,second)
Hour is a number from 0 (zero) to 32767 representing the hour. Any value greater than 23 will be divided by 24 and the remainder
will be treated as the hour value. For example, TIME(27,0,0) = TIME(3,0,0) = .125 or 3:00 AM.
Minute is a number from 0 to 32767 representing the minute. Any value greater than 59 will be converted to hours and minutes. For
example, TIME(0,750,0) = TIME(12,30,0) = .520833 or 12:30 PM.
Second is a number from 0 to 32767 representing the second. Any value greater than 59 will be converted to hours, minutes, and
seconds. For example, TIME(0,0,2000) = TIME(0,33,22) = .023148 or 12:33:20 AM
Remark
Microsoft Excel for Windows and Microsoft Excel for the Macintosh use different date systems as their default. Time values are a
portion of a date value and represented by a decimal number (for example, 12:00 PM is represented as 0.5 because it is half of a day).
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
Note To view the time as a decimal number, select the cell and click Cells on the Format menu. Click the Number tab, and then
click General or Number in the Category box.
1
2
3
A B C
Hour Minute Second
12 0 0
16 48 10
Formula Description (Result)
=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)
Page 1of 1 TIME
15/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
TI MEVALUE
See Also
Returns the decimal number of the time represented by a text string. The decimal number is a value ranging from 0 (zero) to
0.99999999, representing the times from 0:00:00 (12:00:00 AM) to 23:59:59 (11:59:59 P.M.).
Syntax
TI MEVALUE(time_text)
Time_text is a text string that represents a time in any one of the Microsoft Excel time formats; for example, "6:45 PM" and "18:45"
text strings within quotation marks that represent time.
Remarks
Date information in time_text is ignored.
Excel for Windows and Excel for the Macintosh use different date systems as their default. Time values are a portion of a date value
and represented by a decimal number (for example, 12:00 PM is represented as 0.5 because it is half of a day).
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
Note To view the number as a time, select the cell and click Cells on the Format menu. Click the Number tab, and then click Time
in the Category box.
1
2
3
A B
Formula Description (Result)
=TI MEVALUE("2:24 AM") Decimal part of a day, for the time (0.1)
=TI MEVALUE("22-Aug-2008 6:35 AM") Decimal part of a day, for the time (0.274305556)
Page 1of 1 TIMEVALUE
15/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
BESSELI
See Also
Returns the modified Bessel function, which is equivalent to the Bessel function evaluated for purely imaginary arguments.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
1. On the Tools menu, click Add-Ins.
2. I n the Add-Ins available list, select the Analysis ToolPak box, and then click OK.
3. If necessary, follow the instructions in the setup program.
Syntax
BESSELI (x,n)
X is the value at which to evaluate the function.
N is the order of the Bessel function. If n is not an integer, it is truncated.
Remarks
If x is nonnumeric, BESSELI returns the #VALUE! error value.
If n is nonnumeric, BESSELI returns the #VALUE! error value.
If n < 0, BESSELI returns the #NUM! error value.
The n-th order modified Bessel function of the variable x is:
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1. Create a blank workbook or worksheet.
2. Select the example in the Help topic. Do not select the row or column headers.
Selecting an example from Help
3. Press CTRL+C.
4. In the worksheet, select cell A1, and press CTRL+V.
5. To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the
Tools menu, point to Formula Auditing, and then click Formula Auditing Mode.
1
2
A B
Formula Description (Result)
=BESSELI(1.5, 1) Modified Bessel function at 1.5 with an order of 1 (0.981666)
Page 1of 1 BESSELI
13/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
BESSELJ
See Also
Returns the Bessel function.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
BESSELJ (x,n)
X is the value at which to evaluate the function.
N is the order of the Bessel function. If n is not an integer, it is truncated.
Remarks
If x is nonnumeric, BESSELJ returns the #VALUE! error value.
If n is nonnumeric, BESSELJ returns the #VALUE! error value.
If n < 0, BESSELJ returns the #NUM! error value.
The n-th order Bessel function of the variable x is:
where:
is the Gamma function.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
A B
Formula Description (Result)
=BESSELJ (1.9, 2) Bessel function at 1.9 with an order of 2 (0.329926)
Page 1of 1 BESSELJ
13/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
BESSELK
See Also
Returns the modified Bessel function, which is equivalent to the Bessel functions evaluated for purely imaginary arguments.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
BESSELK(x,n)
X is the value at which to evaluate the function.
N is the order of the function. If n is not an integer, it is truncated.
Remarks
If x is nonnumeric, BESSELK returns the #VALUE! error value.
If n is nonnumeric, BESSELK returns the #VALUE! error value.
If n < 0, BESSELK returns the #NUM! error value.
The n-th order modified Bessel function of the variable x is:
where J n and Yn are the J and Y Bessel functions, respectively.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
A B
Formula Description (Result)
=BESSELK(1.5, 1) Modified Bessel function at 1.5 with an order of 1 (0.277388)
Page 1of 1 BESSELK
13/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
BESSELY
See Also
Returns the Bessel function, which is also called the Weber function or the Neumann function.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
BESSELY(x,n)
X is the value at which to evaluate the function.
N is the order of the function. If n is not an integer, it is truncated.
Remarks
If x is nonnumeric, BESSELY returns the #VALUE! error value.
If n is nonnumeric, BESSELY returns the #VALUE! error value.
If n < 0, BESSELY returns the #NUM! error value.
The n-th order Bessel function of the variable x is:
where:
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
A B
Formula Description (Result)
=BESSELY(2.5, 1) Weber's Bessel function at 2.5 and an order of 1 (0.145918)
Page 1of 1 BESSELY
13/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
BI N2DEC
See Also
Converts a binary number to decimal.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
BIN2DEC(number)
Number is the binary number you want to convert. Number cannot contain more than 10 characters (10 bits). The most significant
bit of number is the sign bit. The remaining 9 bits are magnitude bits. Negative numbers are represented using two's-complement
notation.
Remark
I f number is not a valid binary number, or if number contains more than 10 characters (10 bits), BIN2DEC returns the #NUM! error
value.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
A B
Formula Description (Result)
=BI N2DEC(1100100) Converts binary 1100100 to decimal (100)
=BI N2DEC(1111111111) Converts binary 1111111111 to decimal (-1)
Page 1of 1 BIN2DEC
13/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
BI N2HEX
See Also
Converts a binary number to hexadecimal.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
BIN2HEX(number,places)
Number is the binary number you want to convert. Number cannot contain more than 10 characters (10 bits). The most significant bit
of number is the sign bit. The remaining 9 bits are magnitude bits. Negative numbers are represented using two's-complement
notation.
Places is the number of characters to use. If places is omitted, BI N2HEX uses the minimum number of characters necessary. Places is
useful for padding the return value with leading 0s (zeros).
Remarks
I f number is not a valid binary number, or if number contains more than 10 characters (10 bits), BIN2HEX returns the #NUM! error
value.
If number is negative, BIN2HEX ignores places and returns a 10-character hexadecimal number.
If BIN2HEX requires more than places characters, it returns the #NUM! error value.
If places is not an integer, it is truncated.
If places is nonnumeric, BIN2HEX returns the #VALUE! error value.
If places is negative, BIN2HEX returns the #NUM! error value.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
A B
Formula Description (Result)
=BI N2HEX(11111011, 4) Converts binary 11111011 to hexadecimal with 4 characters (00FB)
=BI N2HEX(1110) Converts binary 1110 to hexadecimal (E)
=BI N2HEX(1111111111) Converts binary 1111111111 to hexadecimal (FFFFFFFFFF)
Page 1of 1 BIN2HEX
13/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
BI N2OCT
See Also
Converts a binary number to octal.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
BIN2OCT(number,places)
Number is the binary number you want to convert. Number cannot contain more than 10 characters (10 bits). The most significant
bit of number is the sign bit. The remaining 9 bits are magnitude bits. Negative numbers are represented using two's-complement
notation.
Places is the number of characters to use. I f places is omitted, BI N2OCT uses the minimum number of characters necessary. Places
is useful for padding the return value with leading 0s (zeros).
Remarks
I f number is not a valid binary number, or if number contains more than 10 characters (10 bits), BIN2OCT returns the #NUM! error
value.
If number is negative, BIN2OCT ignores places and returns a 10-character octal number.
If BIN2OCT requires more than places characters, it returns the #NUM! error value.
If places is not an integer, it is truncated.
If places is nonnumeric, BIN2OCT returns the #VALUE! error value.
If places is negative, BIN2OCT returns the #NUM! error value.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
A B
Formula Description (Result)
=BI N2OCT(1001, 3) Converts binary 1001 to octal with 3 characters (011)
=BI N2OCT(1100100) Converts binary 1100100 to octal (144)
=BI N2OCT(1111111111) Converts binary 1111111111 to octal (7777777777)
Page 1of 1 BIN2OCT
13/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
COMPLEX
See Also
Converts real and imaginary coefficients into a complex number of the form x + yi or x + yj.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
COMPLEX(real_num,i_num,suffix)
Real_num is the real coefficient of the complex number.
I_num is the imaginary coefficient of the complex number.
Suffix is the suffix for the imaginary component of the complex number. If omitted, suffix is assumed to be "i".
Note All complex number functions accept "i" and "j" for suffix, but neither "I" nor "J ". Using uppercase results in the #VALUE! error
value. All functions that accept two or more complex numbers require that all suffixes match.
Remarks
If real_num is nonnumeric, COMPLEX returns the #VALUE! error value.
If i_num is nonnumeric, COMPLEX returns the #VALUE! error value.
I f suffix is neither "i" nor "j", COMPLEX returns the #VALUE! error value.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
5
A B
Formula Description (Result)
=COMPLEX(3,4) Complex number with 3 and 4 as the real and imaginary coefficients (3 + 4i)
=COMPLEX(3,4,"j") Complex number with 3 and 4 as the real and imaginary coefficients, and j as the suffix (3 + 4j)
=COMPLEX(0,1) Complex number with 0 and 1 as the real and imaginary coefficients (i)
=COMPLEX(1,0) Complex number with 1 and 0 as the real and imaginary coefficients (1)
Page 1of 1 COMPLEX
13/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
CONVERT
See Also
Converts a number from one measurement system to another. For example, CONVERT can translate a table of distances in miles
to a table of distances in kilometers.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
CONVERT(number,from_unit,to_unit)
Number is the value in from_units to convert.
From_unit is the units for number.
To_unit is the units for the result. CONVERT accepts the following text values (in quotation marks) for from_unit and to_unit.
Weight and mass From_unit or to_unit
Gram "g"
Slug "sg"
Pound mass (avoirdupois) "lbm"
U (atomic mass unit) "u"
Ounce mass (avoirdupois) "ozm"
Distance From_unit or to_unit
Meter "m"
Statute mile "mi"
Nautical mile "Nmi"
Inch "in"
Foot "ft"
Yard "yd"
Angstrom "ang"
Pica (1/72 in.) "Pica"
Time From_unit or to_unit
Year "yr"
Day "day"
Hour "hr"
Minute "mn"
Second "sec"
Pressure From_unit or to_unit
Pascal "Pa"
Atmosphere "atm"
mm of Mercury "mmHg"
Force From_unit or to_unit
Newton "N"
Dyne "dyn"
Pound force "lbf"
Energy From_unit or to_unit
J oule "J "
Erg "e"
Page 1of 3 CONVERT
13/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
The following abbreviated unit prefixes can be prepended to any metric from_unit or to_unit.
Thermodynamic calorie "c"
IT calorie "cal"
Electron volt "eV"
Horsepower-hour "HPh"
Watt-hour "Wh"
Foot-pound "flb"
BTU "BTU"
Power From_unit or to_unit
Horsepower "HP"
Watt "W"
Magnetism From_unit or to_unit
Tesla "T"
Gauss "ga"
Temperature From_unit or to_unit
Degree Celsius "C"
Degree Fahrenheit "F"
Degree Kelvin "K"
Liquid measure From_unit or to_unit
Teaspoon "tsp"
Tablespoon "tbs"
Fluid ounce "oz"
Cup "cup"
U.S. pint "pt"
U.K. pint "uk_pt"
Quart "qt"
Gallon "gal"
Liter "l"
Prefix Multiplier Abbreviation
exa 1E+18 "E"
peta 1E+15 "P"
tera 1E+12 "T"
giga 1E+09 "G"
mega 1E+06 "M"
kilo 1E+03 "k"
hecto 1E+02 "h"
dekao 1E+01 "e"
deci 1E-01 "d"
centi 1E-02 "c"
milli 1E-03 "m"
micro 1E-06 "u"
nano 1E-09 "n"
pico 1E-12 "p"
femto 1E-15 "f"
Page 2of 3 CONVERT
13/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
Remarks
If the input data types are incorrect, CONVERT returns the #VALUE! error value.
If the unit does not exist, CONVERT returns the #N/A error value.
If the unit does not support an abbreviated unit prefix, CONVERT returns the #N/A error value.
If the units are in different groups, CONVERT returns the #N/A error value.
Unit names and prefixes are case-sensitive.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
atto 1E-18 "a"
1
2
3
4
5
A B
Formula Description (Result)
=CONVERT(1.0, "lbm", "kg") Converts 1 pound mass to kilograms (0.453592)
=CONVERT(68, "F", "C") Converts 68 degrees Fahrenheit to Celsius (20)
=CONVERT(2.5, "ft", "sec") Data types are not the same so an error is returned (#N/A)
=CONVERT(CONVERT(100,"ft","m"),"ft","m") Converts 100 square feet into square meters (9.290304).
Page 3of 3 CONVERT
13/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
DEC2BI N
See Also
Converts a decimal number to binary.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
DEC2BI N(number,places)
Number is the decimal integer you want to convert. If number is negative, places is ignored and DEC2BIN returns a 10-character
(10-bit) binary number in which the most significant bit is the sign bit. The remaining 9 bits are magnitude bits. Negative numbers are
represented using two's-complement notation.
Places is the number of characters to use. I f places is omitted, DEC2BIN uses the minimum number of characters necessary. Places is
useful for padding the return value with leading 0s (zeros).
Remarks
I f number < -512 or if number > 511, DEC2BIN returns the #NUM! error value.
If number is nonnumeric, DEC2BIN returns the #VALUE! error value.
If DEC2BIN requires more than places characters, it returns the #NUM! error value.
If places is not an integer, it is truncated.
If places is nonnumeric, DEC2BIN returns the #VALUE! error value.
If places is negative, DEC2BIN returns the #NUM! error value.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
A B
Formula Description (Result)
=DEC2BI N(9, 4) Converts decimal 9 to binary with 4 characters (1001)
=DEC2BI N(-100) Converts decimal -100 to binary (1110011100)
Page 1of 1 DEC2BIN
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
DEC2HEX
See Also
Converts a decimal number to hexadecimal.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
DEC2HEX(number,places)
Number is the decimal integer you want to convert. If number is negative, places is ignored and DEC2HEX returns a 10-character
(40-bit) hexadecimal number in which the most significant bit is the sign bit. The remaining 39 bits are magnitude bits. Negative
numbers are represented using two's-complement notation.
Places is the number of characters to use. If places is omitted, DEC2HEX uses the minimum number of characters necessary. Places
is useful for padding the return value with leading 0s (zeros).
Remarks
I f number < -549,755,813,888 or if number > 549,755,813,887, DEC2HEX returns the #NUM! error value.
If number is nonnumeric, DEC2HEX returns the #VALUE! error value.
If DEC2HEX requires more than places characters, it returns the #NUM! error value.
If places is not an integer, it is truncated.
If places is nonnumeric, DEC2HEX returns the #VALUE! error value.
If places is negative, DEC2HEX returns the #NUM! error value.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
A B
Formula Description (Result)
=DEC2HEX(100, 4) Converts decimal 100 to hexadecimal with 4 characters (0064)
=DEC2HEX(-54) Converts decimal -54 to hexadecimal (FFFFFFFFCA)
Page 1of 1 DEC2HEX
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
DEC2OCT
See Also
Converts a decimal number to octal.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
DEC2OCT(number, places)
Number is the decimal integer you want to convert. If number is negative, places is ignored and DEC2OCT returns a 10-character
(30-bit) octal number in which the most significant bit is the sign bit. The remaining 29 bits are magnitude bits. Negative numbers are
represented using two's-complement notation.
Places is the number of characters to use. I f places is omitted, DEC2OCT uses the minimum number of characters necessary. Places
is useful for padding the return value with leading 0s (zeros).
Remarks
I f number < -536,870,912 or if number > 536,870,911, DEC2OCT returns the #NUM! error value.
If number is nonnumeric, DEC2OCT returns the #VALUE! error value.
If DEC2OCT requires more than places characters, it returns the #NUM! error value.
If places is not an integer, it is truncated.
If places is nonnumeric, DEC2OCT returns the #VALUE! error value.
If places is negative, DEC2OCT returns the #NUM! error value.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
A B
Formula Description (Result)
=DEC2OCT(58, 3) Converts decimal 58 to octal (072)
=DEC2OCT(-100) Converts decimal to octal (7777777634)
Page 1of 1 DEC2OCT
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
DELTA
See Also
Tests whether two values are equal. Returns 1 if number1 = number2; returns 0 otherwise. Use this function to filter a set of
values. For example, by summing several DELTA functions you calculate the count of equal pairs. This function is also known as
the Kronecker Delta function.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
1. On the Tools menu, click Add-Ins.
2. I n the Add-Ins available list, select the Analysis ToolPak box, and then click OK.
3. If necessary, follow the instructions in the setup program.
Syntax
DELTA(number1,number2)
Number1 is the first number.
Number2 is the second number. I f omitted, number2 is assumed to be zero.
Remarks
If number1 is nonnumeric, DELTA returns the #VALUE! error value.
If number2 is nonnumeric, DELTA returns the #VALUE! error value.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
A B
Formula Description (Result)
=DELTA(5, 4) Checks whether 5 equals 4 (0)
=DELTA(5, 5) Checks whether 5 equals 5 (1)
=DELTA(0.5, 0) Checks whether 0.5 equals 0 (0)
Page 1of 1 DELTA
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
ERF
See Also
Returns the error function integrated between lower_limit and upper_limit.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
ERF(lower_limit,upper_limit)
Lower_limit is the lower bound for integrating ERF.
Upper_limit is the upper bound for integrating ERF. If omitted, ERF integrates between zero and lower_limit.
Remarks
If lower_limit is nonnumeric, ERF returns the #VALUE! error value.
If lower_limit is negative, ERF returns the #NUM! error value.
If upper_limit is nonnumeric, ERF returns the #VALUE! error value.
If upper_limit is negative, ERF returns the #NUM! error value.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
A B
Formula Description (Result)
=ERF(0.74500) Error function integrated between 0 and 0.74500 (0.707929)
=ERF(1) Error function integrated between 0 and 1 (0.842701)
Page 1of 1 ERF
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
ERFC
See Also
Returns the complementary ERF function integrated between x and infinity.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
ERFC(x)
X is the lower bound for integrating ERF.
Remarks
If x is nonnumeric, ERFC returns the #VALUE! error value.
If x is negative, ERFC returns the #NUM! error value.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
A B
Formula Description (Result)
=ERFC(1) Complementary ERF function of 1 (0.1573)
Page 1of 1 ERFC
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
FACTDOUBLE
See Also
Returns the double factorial of a number.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
FACTDOUBLE(number)
Number is the value for which to return the double factorial. If number is not an integer, it is truncated.
Remarks
If number is nonnumeric, FACTDOUBLE returns the #VALUE! error value.
If number is negative, FACTDOUBLE returns the #NUM! error value.
If number is even:
If number is odd:
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
A B
Formula Description (Result)
=FACTDOUBLE(6) Double factorial of 6 (48)
=FACTDOUBLE(7) Double factorial of 7 (105)
Page 1of 1 FACTDOUBLE
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
GESTEP
See Also
Returns 1 if number
step; returns 0 (zero) otherwise. Use this function to filter a set of values. For example, by summing
several GESTEP functions you calculate the count of values that exceed a threshold.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
GESTEP(number,step)
Number is the value to test against step.
Step is the threshold value. If you omit a value for step, GESTEP uses zero.
Remark
If any argument is nonnumeric, GESTEP returns the #VALUE! error value.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
5
A B
Formula Description (Result)
=GESTEP(5, 4) Checks whether 5 is greater than or equal to 4 (1)
=GESTEP(5, 5) Checks whether 5 is greater than or equal to 5 (1)
=GESTEP(-4, -5) Checks whether -4 is greater than or equal to -5 (1)
=GESTEP(-1, 0) Checks whether -1 is greater than or equal to 0 (0)
Page 1of 1 GESTEP
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
HEX2BI N
See Also
Converts a hexadecimal number to binary.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
HEX2BI N(number,places)
Number is the hexadecimal number you want to convert. Number cannot contain more than 10 characters. The most significant bit of
number is the sign bit (40th bit from the right). The remaining 9 bits are magnitude bits. Negative numbers are represented using
two's-complement notation.
Places is the number of characters to use. I f places is omitted, HEX2BIN uses the minimum number of characters necessary. Places is
useful for padding the return value with leading 0s (zeros).
Remarks
If number is negative, HEX2BIN ignores places and returns a 10-character binary number.
If number is negative, it cannot be less than FFFFFFFE00, and if number is positive, it cannot be greater than 1FF.
If number is not a valid hexadecimal number, HEX2BIN returns the #NUM! error value.
If HEX2BIN requires more than places characters, it returns the #NUM! error value.
If places is not an integer, it is truncated.
If places is nonnumeric, HEX2BI N returns the #VALUE! error value.
If places is negative, HEX2BIN returns the #NUM! error value.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
A B
Formula Description (Result)
=HEX2BI N("F", 8) Converts hexadecimal F to binary, with 8 characters (00001111)
=HEX2BI N("B7") Converts hexadecimal B7 to binary (10110111)
=HEX2BIN("FFFFFFFFFF") Converts hexadecimal FFFFFFFFFF to binary (1111111111)
Page 1of 1 HEX2BIN
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
HEX2DEC
See Also
Converts a hexadecimal number to decimal.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
HEX2DEC(number)
Number is the hexadecimal number you want to convert. Number cannot contain more than 10 characters (40 bits). The most
significant bit of number is the sign bit. The remaining 39 bits are magnitude bits. Negative numbers are represented using two's-
complement notation.
Remark
If number is not a valid hexadecimal number, HEX2DEC returns the #NUM! error value.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
A B
Formula Description (Result)
=HEX2DEC("A5") Converts hexadecimal A5 to decimal (165)
=HEX2DEC("FFFFFFFF5B") Converts hexadecimal FFFFFFFF5B to decimal (-165)
=HEX2DEC("3DA408B9") Converts hexadecimal 3DA408B9 to decimal (1034160313)
Page 1of 1 HEX2DEC
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
HEX2OCT
See Also
Converts a hexadecimal number to octal.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
HEX2OCT(number,places)
Number is the hexadecimal number you want to convert. Number cannot contain more than 10 characters. The most significant bit of
number is the sign bit. The remaining 39 bits are magnitude bits. Negative numbers are represented using two's-complement notation.
Places is the number of characters to use. If places is omitted, HEX2OCT uses the minimum number of characters necessary. Places
is useful for padding the return value with leading 0s (zeros).
Remarks
If number is negative, HEX2OCT ignores places and returns a 10-character octal number.
If number is negative, it cannot be less than FFE0000000, and if number is positive, it cannot be greater than 1FFFFFFF.
If number is not a valid hexadecimal number, HEX2OCT returns the #NUM! error value.
If HEX2OCT requires more than places characters, it returns the #NUM! error value.
If places is not an integer, it is truncated.
If places is nonnumeric, HEX2OCT returns the #VALUE! error value.
If places is negative, HEX2OCT returns the #NUM! error value.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
A B
Formula Description (Result)
=HEX2OCT("F", 3) Converts hexadecimal F to octal with 3 characters (017)
=HEX2OCT("3B4E") Converts hexadecimal 3B4E to octal (35516)
=HEX2OCT("FFFFFFFF00") Converts hexadecimal FFFFFFFF00 to octal (7777777400)
Page 1of 1 HEX2OCT
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
I MABS
See Also
Returns the absolute value (modulus) of a complex number in x + yi or x + yj text format.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
IMABS(inumber)
Inumber is a complex number for which you want the absolute value.
Remarks
Use COMPLEX to convert real and imaginary coefficients into a complex number.
The absolute value of a complex number is:
where:
z = x + yi
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
A B
Formula Description (Result)
=I MABS("5+12i") Absolute value of 5+12i (13)
Page 1of 1 IMABS
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
I MAGI NARY
See Also
Returns the imaginary coefficient of a complex number in x + yi or x + yj text format.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
IMAGI NARY(inumber)
Inumber is a complex number for which you want the imaginary coefficient.
Remarks
Use COMPLEX to convert real and imaginary coefficients into a complex number.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
A B
Formula Description (Result)
=I MAGI NARY("3+4i") Imaginary coefficient of the complex number 3+4i (4)
=IMAGINARY("0-j") Imaginary coefficient of the complex number 0-j (-1)
=IMAGINARY(4) Imaginary coefficient 4 (0)
Page 1of 1 IMAGINARY
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
I MARGUMENT
See Also
Returns the argument (theta), an angle expressed in radians, such that:
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
IMARGUMENT(inumber)
Inumber is a complex number for which you want the argument .
Remarks
Use COMPLEX to convert real and imaginary coefficients into a complex number.
IMARGUMENT is calculated as follows:
where:
and
z = x + yi
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
A B
Formula Description (Result)
=IMARGUMENT("3+4i") Theta argument of 3+4i, in radians (0.927295)
Page 1of 1 IMARGUMENT
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
I MCONJ UGATE
See Also
Returns the complex conjugate of a complex number in x + yi or x + yj text format.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
IMCONJ UGATE(inumber)
Inumber is a complex number for which you want the conjugate.
Remarks
2Use COMPLEX to convert real and imaginary coefficients into a complex number.
The conjugate of a complex number is:
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
A B
Formula Description (Result)
=IMCONJ UGATE("3+4i") Complex conjugate of 3+4i (3 - 4i)
Page 1of 1 IMCONJ UGATE
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
I MCOS
See Also
Returns the cosine of a complex number in x + yi or x + yj text format.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
IMCOS(inumber)
Inumber is a complex number for which you want the cosine.
Remarks
Use COMPLEX to convert real and imaginary coefficients into a complex number.
If inumber is a logical value, IMCOS returns the #VALUE! error value.
The cosine of a complex number is:
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
A B
Formula Description (Result)
=IMCOS("1+i") Cosine of 1+i (0.83373 - 0.988898i)
Page 1of 1 IMCOS
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
I MDI V
See Also
Returns the quotient of two complex numbers in x + yi or x + yj text format.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
IMDI V(inumber1,inumber2)
Inumber1 is the complex numerator or dividend.
Inumber2 is the complex denominator or divisor.
Remarks
Use COMPLEX to convert real and imaginary coefficients into a complex number.
The quotient of two complex numbers is:
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
A B
Formula Description (Result)
=I MDI V("-238+240i","10+24i") Quotient of the two complex numbers in the formula (5 + 12i)
Page 1of 1 IMDIV
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
I MEXP
See Also
Returns the exponential of a complex number in x + yi or x + yj text format.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
IMEXP(inumber)
Inumber is a complex number for which you want the exponential.
Remarks
Use COMPLEX to convert real and imaginary coefficients into a complex number.
The exponential of a complex number is:
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
A B
Formula Description (Result)
=IMEXP("1+i") Exponential of the complex number 1+i (1.468694 + 2.287355i)
Page 1of 1 IMEXP
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
I MLN
See Also
Returns the natural logarithm of a complex number in x + yi or x + yj text format.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
IMLN(inumber)
Inumber is a complex number for which you want the natural logarithm.
Remarks
Use COMPLEX to convert real and imaginary coefficients into a complex number.
The natural logarithm of a complex number is:
where:
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
A B
Formula Description (Result)
=IMLN("3+4i") Natural logarithm of 3+4i (1.609438 + 0.927295i)
Page 1of 1 IMLN
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
I MLOG2
See Also
Returns the base-2 logarithm of a complex number in x + yi or x + yj text format.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
IMLOG2(inumber)
Inumber is a complex number for which you want the base-2 logarithm.
Remarks
Use COMPLEX to convert real and imaginary coefficients into a complex number.
The base-2 logarithm of a complex number can be calculated from the natural logarithm as follows:
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
A B
Formula Description (Result)
=IMLOG2("3+4i") Base-2 logarithm of 3+4i (2.321928 + 1.337804i)
Page 1of 1 IMLOG2
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
I MLOG10
See Also
Returns the common logarithm (base 10) of a complex number in x + yi or x + yj text format.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
IMLOG10(inumber)
Inumber is a complex number for which you want the common logarithm.
Remarks
Use COMPLEX to convert real and imaginary coefficients into a complex number.
The common logarithm of a complex number can be calculated from the natural logarithm as follows:
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
A B
Formula Description (Result)
=I MLOG10("3+4i") Logarithm (base 10) of 3+4i (0.69897 + 0.402719i)
Page 1of 1 IMLOG10
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
I MPOWER
See Also
Returns a complex number in x + yi or x + yj text format raised to a power.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
IMPOWER(inumber,number)
Inumber is a complex number you want to raise to a power.
Number is the power to which you want to raise the complex number.
Remarks
Use COMPLEX to convert real and imaginary coefficients into a complex number.
If number is nonnumeric, IMPOWER returns the #VALUE! error value.
Number can be an integer, fractional, or negative.
A complex number raised to a power is calculated as follows:
where:
and:
and:
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
A B
Formula Description (Result)
=I MPOWER("2+3i", 3) 2+3i raised to the power of 3 (-46 + 9i)
Page 1of 1 IMPOWER
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
I MPRODUCT
See Also
Returns the product of 2 to 29 complex numbers in x + yi or x + yj text format.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
IMPRODUCT(inumber1,inumber2,...)
Inumber1, inumber2, are 1 to 29 complex numbers to multiply.
Remarks
Use COMPLEX to convert real and imaginary coefficients into a complex number.
The product of two complex numbers is:
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
A B
Formula Description (Result)
=I MPRODUCT("3+4i","5-3i") Product of the two complex numbers (27 + 11i)
=I MPRODUCT("1+2i",30) Product of a complex number and 30 (30 + 60i)
Page 1of 1 IMPRODUCT
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
I MREAL
See Also
Returns the real coefficient of a complex number in x + yi or x + yj text format.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
IMREAL(inumber)
Inumber is a complex number for which you want the real coefficient.
Remarks
Use COMPLEX to convert real and imaginary coefficients into a complex number.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
A B
Formula Description (Result)
=IMREAL("6-9i") Real coefficient of 6-9i (6)
Page 1of 1 IMREAL
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
I MSI N
See Also
Returns the sine of a complex number in x + yi or x + yj text format.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
IMSI N(inumber)
Inumber is a complex number for which you want the sine.
Remarks
Use COMPLEX to convert real and imaginary coefficients into a complex number.
The sine of a complex number is:
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
A B
Formula Description (Result)
=I MSI N("3+4i") Sine of 3+4i (3.853738 - 27.016813i)
Page 1of 1 IMSIN
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
I MSQRT
See Also
Returns the square root of a complex number in x + yi or x + yj text format.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
IMSQRT(inumber)
Inumber is a complex number for which you want the square root.
Remarks
Use COMPLEX to convert real and imaginary coefficients into a complex number.
The square root of a complex number is:
where:
and:
and:
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
A B
Formula Description (Result)
=IMSQRT("1+i") Square root of 1+i (1.098684 + 0.45509i)
Page 1of 1 IMSQRT
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
I MSUB
See Also
Returns the difference of two complex numbers in x + yi or x + yj text format.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
IMSUB(inumber1,inumber2)
Inumber1 is the complex number from which to subtract inumber2.
Inumber2 is the complex number to subtract from inumber1.
Remarks
Use COMPLEX to convert real and imaginary coefficients into a complex number.
The difference of two complex numbers is:
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
A B
Formula Description (Result)
=I MSUB("13+4i","5+3i") Difference between the two complex numbers in the formula (8 + i)
Page 1of 1 IMSUB
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
I MSUM
See Also
Returns the sum of two or more complex numbers in x + yi or x + yj text format.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
IMSUM(inumber1,inumber2,...)
Inumber1,inumber2,... are 1 to 29 complex numbers to add.
Remarks
Use COMPLEX to convert real and imaginary coefficients into a complex number.
The sum of two complex numbers is:
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
A B
Formula Description (Result)
=I MSUM("3+4i","5-3i") Sum of the two complex numbers in the formula (8+i)
Page 1of 1 IMSUM
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
OCT2BI N
See Also
Converts an octal number to binary.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
OCT2BIN(number,places)
Number is the octal number you want to convert. Number may not contain more than 10 characters. The most significant bit of
number is the sign bit. The remaining 29 bits are magnitude bits. Negative numbers are represented using two's-complement notation.
Places is the number of characters to use. I f places is omitted, OCT2BIN uses the minimum number of characters necessary. Places
is useful for padding the return value with leading 0s (zeros).
Remarks
If number is negative, OCT2BIN ignores places and returns a 10-character binary number.
I f number is negative, it cannot be less than 7777777000, and if number is positive, it cannot be greater than 777.
If number is not a valid octal number, OCT2BIN returns the #NUM! error value.
If OCT2BIN requires more than places characters, it returns the #NUM! error value.
If places is not an integer, it is truncated.
If places is nonnumeric, OCT2BIN returns the #VALUE! error value.
If places is negative, OCT2BIN returns the #NUM! error value.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
A B
Formula Description (Result)
=OCT2BI N(3, 3) Converts octal 3 to binary with 3 characters (011)
=OCT2BI N(7777777000) Converts octal 7777777000 to binary (1000000000)
Page 1of 1 OCT2BIN
15/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
OCT2DEC
See Also
Converts an octal number to decimal.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
OCT2DEC(number)
Number is the octal number you want to convert. Number may not contain more than 10 octal characters (30 bits). The most
significant bit of number is the sign bit. The remaining 29 bits are magnitude bits. Negative numbers are represented using two's-
complement notation.
Remark
If number is not a valid octal number, OCT2DEC returns the #NUM! error value.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
A B
Formula Description (Result)
=OCT2DEC(54) Converts octal 54 to decimal (44)
=OCT2DEC(7777777533) Converts octal 7777777533 to decimal (-165)
Page 1of 1 OCT2DEC
15/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
OCT2HEX
See Also
Converts an octal number to hexadecimal.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
OCT2HEX(number,places)
Number is the octal number you want to convert. Number may not contain more than 10 octal characters (30 bits). The most
significant bit of number is the sign bit. The remaining 29 bits are magnitude bits. Negative numbers are represented using two's-
complement notation.
Places is the number of characters to use. If places is omitted, OCT2HEX uses the minimum number of characters necessary. Places
is useful for padding the return value with leading 0s (zeros).
Remarks
If number is negative, OCT2HEX ignores places and returns a 10-character hexadecimal number.
If number is not a valid octal number, OCT2HEX returns the #NUM! error value.
If OCT2HEX requires more than places characters, it returns the #NUM! error value.
If places is not an integer, it is truncated.
If places is nonnumeric, OCT2HEX returns the #VALUE! error value.
If places is negative, OCT2HEX returns the #NUM! error value.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
A B
Formula Description (Result)
=OCT2HEX(100, 4) Converts octal number 100 to hexadecimal with 4 characters (0040)
=OCT2HEX(7777777533) Converts octal number 7777777533 to hexadecimal (FFFFFFFF5B)
Page 1of 1 OCT2HEX
15/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
ACCRI NT
See Also
Returns the accrued interest for a security that pays periodic interest.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
1. On the Tools menu, click Add-Ins.
2. I n the Add-Ins available list, select the Analysis ToolPak box, and then click OK.
3. If necessary, follow the instructions in the setup program.
Syntax
ACCRI NT(issue,first_interest,settlement,rate,par,frequency,basis)
Important Dates should be entered by using the DATE function, or as results of other formulas or functions. For example, use DATE
(2008,5,23) for the 23rd day of May, 2008. Problems can occur if dates are entered as text.
Issue is the security's issue date.
First_interest is the security's first interest date.
Settlement is the security's settlement date. The security settlement date is the date after the issue date when the security is traded
to the buyer.
Rate is the security's annual coupon rate.
Par is the security's par value. I f you omit par, ACCRI NT uses $1,000.
Frequency is the number of coupon payments per year. For annual payments, frequency = 1; for semiannual, frequency = 2; for
quarterly, frequency = 4.
Basis is the type of day count basis to use.
Remarks
Microsoft Excel stores dates as sequential serial numbers so they can be used in calculations. By default, J anuary 1, 1900 is serial
number 1, and J anuary 1, 2008 is serial number 39448 because it is 39,448 days after J anuary 1, 1900. Microsoft Excel for the
Macintosh uses a different date system as its default.
Issue, first_interest, settlement, frequency, and basis are truncated to integers.
If issue, first_interest, or settlement is not a valid date, ACCRINT returns the #VALUE! error value.
If rate
0 or if par
0 or if par
0, nper
0, or pv
0, nper
0, or pv
0 or if redemption
0 or if redemption
0 or if redemption
0 or if discount
maturity, or if maturity is more than one year after settlement, TBILLYIELD returns the #NUM! error value.
TBILLYIELD is calculated as follows:
where:
DSM = number of days from settlement to maturity, excluding any maturity date that is more than one calendar year after the
settlement date.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
A B
Data Description
March 31, 2008 Settlement date
J une 1, 2008 Maturity date
98.45 Price per $100 face value
Formula Description (Result)
=TBILLYIELD(A2,A3,A4) The yield, for the treasury bill with the terms above (0.091417 or 9.1417 percent)
Page 1of 1 TBILLYIELD
15/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
VDB
See Also
Returns the depreciation of an asset for any period you specify, including partial periods, using the double-declining balance
method or some other method you specify. VDB stands for variable declining balance.
Syntax
VDB(cost,salvage,life,start_period,end_period,factor,no_switch)
Cost is the initial cost of the asset.
Salvage is the value at the end of the depreciation (sometimes called the salvage value of the asset).
Life is the number of periods over which the asset is depreciated (sometimes called the useful life of the asset).
Start_period is the starting period for which you want to calculate the depreciation. Start_period must use the same units as life.
End_period is the ending period for which you want to calculate the depreciation. End_period must use the same units as life.
Factor is the rate at which the balance declines. If factor is omitted, it is assumed to be 2 (the double-declining balance method).
Change factor if you do not want to use the double-declining balance method. For a description of the double-declining balance
method, see DDB.
No_switch is a logical value specifying whether to switch to straight-line depreciation when depreciation is greater than the declining
balance calculation.
If no_switch is TRUE, Microsoft Excel does not switch to straight-line depreciation even when the depreciation is greater than the
declining balance calculation.
If no_switch is FALSE or omitted, Excel switches to straight-line depreciation when depreciation is greater than the declining
balance calculation.
All arguments except no_switch must be positive numbers.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
Note The results are rounded to two decimal places.
1
2
3
4
A B
Data Description
2400 Initial cost
300 Salvage value
10 Lifetime in years
Formula Description (Result)
=VDB(A2, A3,
A4*365, 0, 1)
First day's depreciation. Excel automatically assumes that factor is 2 (1.32)
=VDB(A2, A3,
A4*12, 0, 1)
First month's depreciation (40.00)
=VDB(A2, A3, A4,
0, 1)
First year's depreciation (480.00)
=VDB(A2, A3,
A4*12, 6, 18)
Depreciation between the sixth month and the eighteenth month (396.31)
=VDB(A2, A3,
A4*12, 6, 18, 1.5)
Depreciation between the sixth month and the eighteenth month using a factor of 1.5 instead of the double-
declining balance method (311.81)
=VDB(A2, A3, A4,
0, 0.875, 1.5)
Depreciation for the first fiscal year that you own the asset, assuming that tax laws limit you to 150-percent
depreciation of the declining balance. Asset is purchased in the middle of the first quarter of the fiscal year.
(315.00)
Page 1of 1 VDB
15/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
XI RR
See Also
Returns the internal rate of return for a schedule of cash flows that is not necessarily periodic. To calculate the internal rate of
return for a series of periodic cash flows, use the IRR function.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
XI RR(values,dates,guess)
Values is a series of cash flows that corresponds to a schedule of payments in dates. The first payment is optional and corresponds
to a cost or payment that occurs at the beginning of the investment. If the first value is a cost or payment, it must be a negative value.
All succeeding payments are discounted based on a 365-day year. The series of values must contain at least one positive and one
negative value.
Dates is a schedule of payment dates that corresponds to the cash flow payments. The first payment date indicates the beginning of
the schedule of payments. All other dates must be later than this date, but they may occur in any order. Dates should be entered by
using the DATE function, or as results of other formulas or functions. For example, use DATE(2008,5,23) for the 23rd day of May,
2008. Problems can occur if dates are entered as text.
Guess is a number that you guess is close to the result of XIRR.
Remarks
Microsoft Excel stores dates as sequential serial numbers so they can be used in calculations. By default, J anuary 1, 1900 is serial
number 1, and J anuary 1, 2008 is serial number 39448 because it is 39,448 days after J anuary 1, 1900. Microsoft Excel for the
Macintosh uses a different date system as its default.
Numbers in dates are truncated to integers.
XIRR expects at least one positive cash flow and one negative cash flow; otherwise, XIRR returns the #NUM! error value.
If any number in dates is not a valid date, XIRR returns the #VALUE! error value.
If any number in dates precedes the starting date, XIRR returns the #NUM! error value.
If values and dates contain a different number of values, XIRR returns the #NUM! error value.
In most cases you do not need to provide guess for the XIRR calculation. If omitted, guess is assumed to be 0.1 (10 percent).
XIRR is closely related to XNPV, the net present value function. The rate of return calculated by XIRR is the interest rate
corresponding to XNPV = 0.
Excel uses an iterative technique for calculating XIRR. Using a changing rate (starting with guess), XI RR cycles through the
calculation until the result is accurate within 0.000001 percent. I f XIRR can't find a result that works after 100 tries, the #NUM!
error value is returned. The rate is changed until:
where:
di = the ith, or last, payment date.
d1 = the 0th payment date.
Pi = the ith, or last, payment.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
A B
Values Dates
-10,000 J anuary 1, 2008
2,750 March 1, 2008
4,250 October 30, 2008
Page 1of 2 XIRR
15/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
Note To view the number as a percentage, select the cell and click Cells on the Format menu. Click the Number tab, and then click
Percentage in the Category box.
5
6
3,250 February 15, 2009
2,750 April 1, 2009
Formula Description (Result)
=XI RR(A2:A6,B2:B6,0.1) The internal rate of return (0.373362535 or 37.34%)
Page 2of 2 XIRR
15/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
XNPV
See Also
Returns the net present value for a schedule of cash flows that is not necessarily periodic. To calculate the net present value for a
series of cash flows that is periodic, use the NPV function.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
XNPV(rate,values,dates)
Rate is the discount rate to apply to the cash flows.
Values is a series of cash flows that corresponds to a schedule of payments in dates. The first payment is optional and corresponds
to a cost or payment that occurs at the beginning of the investment. If the first value is a cost or payment, it must be a negative value.
All succeeding payments are discounted based on a 365-day year. The series of values must contain at least one positive value and one
negative value.
Dates is a schedule of payment dates that corresponds to the cash flow payments. The first payment date indicates the beginning of
the schedule of payments. All other dates must be later than this date, but they may occur in any order.
Remarks
Microsoft Excel stores dates as sequential serial numbers so they can be used in calculations. By default, J anuary 1, 1900 is serial
number 1, and J anuary 1, 2008 is serial number 39448 because it is 39,448 days after J anuary 1, 1900. Microsoft Excel for the
Macintosh uses a different date system as its default.
Numbers in dates are truncated to integers.
If any argument is nonnumeric, XNPV returns the #VALUE! error value.
If any number in dates is not a valid date, XNPV returns the #VALUE! error value.
If any number in dates precedes the starting date, XNPV returns the #NUM! error value.
If values and dates contain a different number of values, XNPV returns the #NUM! error value.
XNPV is calculated as follows:
where:
di = the ith, or last, payment date.
d1 = the 0th payment date.
Pi = the ith, or last, payment.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
5
6
A B
Values Dates
-10,000 J anuary 1, 2008
2,750 March 1, 2008
4,250 October 30, 2008
3,250 February 15, 2009
2,750 April 1, 2009
Formula Description (Result)
=XNPV
(.09,A2:A6,B2:B6)
The net present value for an investment with the above cost and returns. The cash flows are discounted
at 9 percent. (2086.6476 or 2086.65)
Page 1of 1 XNPV
15/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\XLMAIN11....
YI ELD
See Also
Returns the yield on a security that pays periodic interest. Use YIELD to calculate bond yield.
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
How?
Syntax
YI ELD(settlement,maturity,rate,pr,redemption,frequency,basis)
Important Dates should be entered by using the DATE function, or as results of other formulas or functions. For example, use DATE
(2008,5,23) for the 23rd day of May, 2008. Problems can occur if dates are entered as text.
Settlement is the security's settlement date. The security settlement date is the date after the issue date when the security is traded
to the buyer.
Maturity is the security's maturity date. The maturity date is the date when the security expires.
Rate is the security's annual coupon rate.
Pr is the security's price per $100 face value.
Redemption is the security's redemption value per $100 face value.
Frequency is the number of coupon payments per year. For annual payments, frequency = 1; for semiannual, frequency = 2; for
quarterly, frequency = 4.
Basis is the type of day count basis to use.
Remarks
Microsoft Excel stores dates as sequential serial numbers so they can be used in calculations. By default, J anuary 1, 1900 is serial
number 1, and J anuary 1, 2008 is serial number 39448 because it is 39,448 days after J anuary 1, 1900. Microsoft Excel for the
Macintosh uses a different date system as its default.
The settlement date is the date a buyer purchases a coupon, such as a bond. The maturity date is the date when a coupon expires.
For example, suppose a 30-year bond is issued on J anuary 1, 2008, and is purchased by a buyer six months later. The issue date
would be J anuary 1, 2008, the settlement date would be J uly 1, 2008, and the maturity date would be J anuary 1, 2038, which is 30
years after the J anuary 1, 2008, issue date.
Settlement, maturity, frequency, and basis are truncated to integers.
If settlement or maturity is not a valid date, YIELD returns the #VALUE! error value.
If rate < 0, YIELD returns the #NUM! error value.
If pr
0 or if redemption
0 or if redemption
0 or beta
0 or beta
0 or alpha
-1 or if x
0 or if beta
0 or if beta
0 or if k is greater than the number of data points, LARGE returns the #NUM! error value.
If n is the number of data points in a range, then LARGE(array,1) returns the largest value, and LARGE(array,n) returns the smallest
value.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
5
6
A B
Data Data
3 4
5 2
3 4
5 6
4 7
Formula Description (Result)
=LARGE(A2:B6,3) 3rd largest number in the numbers above (5)
=LARGE(A2:B6,7) 7th largest number in the numbers above (4)
Page 1of 1 LARGE
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
LI NEST
See Also
Calculates the statistics for a line by using the "least squares" method to calculate a straight line that best fits your data, and
returns an array that describes the line. Because this function returns an array of values, it must be entered as an array formula.
The equation for the line is:
y = mx + b or
y = m1x1 + m2x2 + ... + b (if there are multiple ranges of x-values)
where the dependent y-value is a function of the independent x-values. The m-values are coefficients corresponding to each x-value,
and b is a constant value. Note that y, x, and m can be vectors. The array that LINEST returns is {mn,mn-1,...,m1,b}. LINEST can also
return additional regression statistics.
Syntax
LINEST(known_y's,known_x's,const,stats)
Known_y's is the set of y-values you already know in the relationship y = mx + b.
If the array known_y's is in a single column, then each column of known_x's is interpreted as a separate variable.
If the array known_y's is in a single row, then each row of known_x's is interpreted as a separate variable.
Known_x's is an optional set of x-values that you may already know in the relationship y = mx + b.
The array known_x's can include one or more sets of variables. If only one variable is used, known_y's and known_x's can be
ranges of any shape, as long as they have equal dimensions. If more than one variable is used, known_y's must be a vector (that
is, a range with a height of one row or a width of one column).
If known_x's is omitted, it is assumed to be the array {1,2,3,...} that is the same size as known_y's.
Const is a logical value specifying whether to force the constant b to equal 0.
If const is TRUE or omitted, b is calculated normally.
If const is FALSE, b is set equal to 0 and the m-values are adjusted to fit y = mx.
Stats is a logical value specifying whether to return additional regression statistics.
If stats is TRUE, LINEST returns the additional regression statistics, so the returned array is {mn,mn-1,...,m1,b;sen,sen-
1,...,se1,seb;r2,sey;F,df;ssreg,ssresid}.
If stats is FALSE or omitted, LINEST returns only the m-coefficients and the constant b.
The additional regression statistics are as follows.
The following illustration shows the order in which the additional regression statistics are returned.
Statistic Description
se1,se2,...,sen The standard error values for the coefficients m1,m2,...,mn.
seb The standard error value for the constant b (seb = #N/A when const is FALSE).
r2 The coefficient of determination. Compares estimated and actual y-values, and ranges in value from 0 to 1. If it is 1,
there is a perfect correlation in the sample there is no difference between the estimated y-value and the actual y-
value. At the other extreme, if the coefficient of determination is 0, the regression equation is not helpful in predicting
a y-value. For information about how r2 is calculated, see "Remarks" later in this topic.
sey The standard error for the y estimate.
F The F statistic, or the F-observed value. Use the F statistic to determine whether the observed relationship between
the dependent and independent variables occurs by chance.
df The degrees of freedom. Use the degrees of freedom to help you find F-critical values in a statistical table. Compare
the values you find in the table to the F statistic returned by LINEST to determine a confidence level for the model. For
information about how df is calculated, see "Remarks" later in this topic. Example 4 below shows use of F and df.
ssreg The regression sum of squares.
ssresid The residual sum of squares. For information about how ssreg and ssresid are calculated, see "Remarks" later in this
topic.
Page 1of 6 LINEST
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
Remarks
You can describe any straight line with the slope and the y-intercept:
Slope (m):
To find the slope of a line, often written as m, take two points on the line, (x1,y1) and (x2,y2); the slope is equal to (y2 - y1)/(x2 -
x1).
Y-intercept (b):
The y-intercept of a line, often written as b, is the value of y at the point where the line crosses the y-axis.
The equation of a straight line is y = mx + b. Once you know the values of m and b, you can calculate any point on the line by
plugging the y- or x-value into that equation. You can also use the TREND function.
When you have only one independent x-variable, you can obtain the slope and y-intercept values directly by using the following
formulas:
Slope:
=INDEX(LINEST(known_y's,known_x's),1)
Y-intercept:
=INDEX(LINEST(known_y's,known_x's),2)
The accuracy of the line calculated by LINEST depends on the degree of scatter in your data. The more linear the data, the more
accurate the LINEST model. LINEST uses the method of least squares for determining the best fit for the data. When you have only
one independent x-variable, the calculations for m and b are based on the following formulas:
where x and y are sample means, i.e., x = AVERAGE(known x's) and y = AVERAGE(known_y's).
The line- and curve-fitting functions LINEST and LOGEST can calculate the best straight line or exponential curve that fits your
data. However, you have to decide which of the two results best fits your data. You can calculate TREND(known_y's,known_x's) for
a straight line, or GROWTH(known_y's, known_x's) for an exponential curve. These functions, without the new_x's argument,
return an array of y-values predicted along that line or curve at your actual data points. You can then compare the predicted values
with the actual values. You may want to chart them both for a visual comparison.
In regression analysis, Microsoft Excel calculates for each point the squared difference between the y-value estimated for that point
and its actual y-value. The sum of these squared differences is called the residual sum of squares, ssresid. Microsoft Excel then
calculates the total sum of squares, sstotal. When const = TRUE, or omitted, the total sum of squares is the sum of the squared
differences between the actual y-values and the average of the y-values. When const = FALSE, the total sum of squares is the sum
of the squares of the actual y-values (without subtracting the average y-value from each individual y-value). Then regression sum
of squares, ssreg, can be found from: ssreg = sstotal - ssresid. The smaller the residual sum of squares is, compared with the total
sum of squares, the larger the value of the coefficient of determination, r2, which is an indicator of how well the equation resulting
from the regression analysis explains the relationship among the variables. r2 equals ssreg/sstotal.
In some cases, one or more of the X columns (assume that Ys and Xs are in columns) may have no additional predictive value in
the presence of the other X columns. In other words, eliminating one or more X columns might lead to predicted Y values that are
equally accurate. In that case these redundant X columns should be omitted from the regression model. This phenomenon is called
collinearity because any redundant X column can be expressed as a sum of multiples of the non-redundant X columns. LINEST
checks for collinearity and removes any redundant X columns from the regression model when it identifies them. Removed X
columns can be recognized in LINEST output as having 0 coefficients as well as 0 ses. If one or more columns are removed as
redundant, then df is affected because df depends on the number of X columns actually used for predictive purposes. For details on
the computation of df, see Example 4 below. If df is changed because redundant X columns are removed, values of sey and F are
also affected. Collinearity should be relatively rare in practice. However, one case where it is more likely to arise is when some X
columns contain only 0s and 1s as indicators of whether a subject in an experiment is or is not a member of a particular group. If
const = TRUE or omitted, LINEST effectively inserts an additional X column of all 1s to model the intercept. If you have a column
with a 1 for each subject if male, or 0 if not, and you also have a column with a 1 for each subject if female, or 0 if not, this latter
column is redundant because entries in it can be obtained from subtracting the entry in the male indicator column from the entry
in the additional column of all 1s added by LINEST.
Page 2of 6 LINEST
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
df is calculated as follows when no X columns are removed from the model due to collinearity: if there are k columns of known_xs
and const = TRUE or omitted, then df = n k 1. If const = FALSE, then df = n - k. In both cases, each X column removed due to
collinearity increases df by 1.
Formulas that return arrays must be entered as array formulas.
When entering an array constant such as known_x's as an argument, use commas to separate values in the same row and
semicolons to separate rows. Separator characters may be different depending on your locale setting in Regional Settings or
Regional Options in Control Panel.
Note that the y-values predicted by the regression equation may not be valid if they are outside the range of the y-values you used
to determine the equation.
Example 1 Slope and Y-Intercept
The example may be easier to understand if you copy it to a blank worksheet.
How?
1. Create a blank workbook or worksheet.
2. Select the example in the Help topic. Do not select the row or column headers.
Selecting an example from Help
3. Press CTRL+C.
4. In the worksheet, select cell A1, and press CTRL+V.
5. To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the
Tools menu, point to Formula Auditing, and then click Formula Auditing Mode.
Note The formula in the example must be entered as an array formula. After copying the example to a blank worksheet, select the
range A7:B7 starting with the formula cell. Press F2, and then press CTRL+SHIFT+ENTER. If the formula is not entered as an array
formula, the single result is 2.
When entered as an array, the slope (2) and the y-intercept (1) are returned.
Example 2 Simple Linear Regression
The example may be easier to understand if you copy it to a blank worksheet.
How?
1. Create a blank workbook or worksheet.
2. Select the example in the Help topic. Do not select the row or column headers.
1
2
3
4
5
A B
Known y Known x
1 0
9 4
5 2
7 3
Formula Formula
=LINEST(A2:A5,B2:B5,,FALSE)
Page 3of 6 LINEST
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
Selecting an example from Help
3. Press CTRL+C.
4. In the worksheet, select cell A1, and press CTRL+V.
5. To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the
Tools menu, point to Formula Auditing, and then click Formula Auditing Mode.
In general, SUM({m,b}*{x,1}) equals mx + b, the estimated y-value for a given x-value. You can also use the TREND function.
Example 3 Multiple Linear Regression
Suppose a commercial developer is considering purchasing a group of small office buildings in an established business district.
The developer can use multiple linear regression analysis to estimate the value of an office building in a given area based on the
following variables.
This example assumes that a straight-line relationship exists between each independent variable (x1, x2, x3, and x4) and the
dependent variable (y), the value of office buildings in the area.
The developer randomly chooses a sample of 11 office buildings from a possible 1,500 office buildings and obtains the following data.
"Half an entrance" means an entrance for deliveries only.
The example may be easier to understand if you copy it to a blank worksheet.
How?
1. Create a blank workbook or worksheet.
2. Select the example in the Help topic. Do not select the row or column headers.
Selecting an example from Help
3. Press CTRL+C.
4. In the worksheet, select cell A1, and press CTRL+V.
5. To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the
Tools menu, point to Formula Auditing, and then click Formula Auditing Mode.
1
2
3
4
5
6
7
A B
Month Sales
1 3100
2 4500
3 4400
4 5400
5 7500
6 8100
Formula Description (Result)
=SUM(LINEST(B2:B7, A2:A7)*{9,1}) Estimate sales for the ninth month (11000)
Variable Refers to the
y Assessed value of the office building
x1 Floor space in square feet
x2 Number of offices
x3 Number of entrances
x4 Age of the office building in years
Page 4of 6 LINEST
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
Note The formula in the example must be entered as an array formula. After copying the example to a blank worksheet, select the
range A14:E18 starting with the formula cell. Press F2, and then press CTRL+SHIFT+ENTER. If the formula is not entered as an array
formula, the single result is -234.2371645.
When entered as an array, the following regression statistics are returned. Use this key to identify the statistic you want.
The multiple regression equation, y = m1*x1 + m2*x2 + m3*x3 + m4*x4 + b, can now be obtained using the values from row 14:
y = 27.64*x1 + 12,530*x2 + 2,553*x3 - 234.24*x4 + 52,318
The developer can now estimate the assessed value of an office building in the same area that has 2,500 square feet, three offices,
and two entrances and is 25 years old, by using the following equation:
y = 27.64*2500 + 12530*3 + 2553*2 - 234.24*25 + 52318 = $158,261
Or you can copy the following table to cell A21 of the example workbook.
You can also use the TREND function to calculate this value.
Example 4 Using the F and r2 Statistics
In the previous example, the coefficient of determination, or r2, is 0.99675 (see cell A17 in the output for LINEST), which would
indicate a strong relationship between the independent variables and the sale price. You can use the F statistic to determine whether
these results, with such a high r2 value, occurred by chance.
Assume for the moment that in fact there is no relationship among the variables, but that you have drawn a rare sample of 11 office
buildings that causes the statistical analysis to demonstrate a strong relationship. The term "Alpha" is used for the probability of
erroneously concluding that there is a relationship.
F and df in LINEST output can be used to assess the likelihood of a higher F value occurring by chance. F can be compared with critical
values in published F-distribution tables or Excels FDIST can be used to calculate the probability of a larger F value occurring by
chance. The appropriate F distribution has v1 and v2 degrees of freedom. If n is the number of data points and const = TRUE or
omitted, then v1 = n df 1 and v2 = df. (If const = FALSE, then v1 = n df and v2 = df.) Excels FDIST(F,v1,v2) will return the
probability of a higher F value occurring by chance. In Example 4, df = 6 (cell B18) and F = 459.753674 (cell A18).
Assuming an Alpha value of 0.05, v1 = 11 6 1 = 4 and v2 = 6, the critical level of F is 4.53. Since F = 459.753674 is much higher
than 4.53, it is extremely unlikely that an F value this high occurred by chance. (With Alpha = 0.05, the hypothesis that there is no
relationship between known_ys and known_xs is to be rejected when F exceeds the critical level, 4.53.) Using Excels FDIST you can
obtain the probability that an F value this high occurred by chance. FDIST(459.753674, 4, 6) = 1.37E-7, an extremely small probability.
1
2
3
4
5
6
7
8
9
10
11
12
A B C D E
Floor space (x1) Offices (x2) Entrances (x3) Age (x4) Assessed value (y)
2310 2 2 20 142,000
2333 2 2 12 144,000
2356 3 1.5 33 151,000
2379 3 2 43 150,000
2402 2 3 53 139,000
2425 4 2 23 169,000
2448 2 1.5 99 126,000
2471 2 2 34 142,900
2494 3 3 23 163,000
2517 4 4 55 169,000
2540 2 3 22 149,000
Formula
=LINEST(E2:E12,A2:D12,TRUE,TRUE)
Floor space (x1) Offices (x2) Entrances (x3) Age (x4) Assessed value (y)
2500 3 2 25 =D14*A22 + C14*B22 + B14*C22 + A14*D22 + E14
Page 5of 6 LINEST
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
You can conclude, either by finding the critical level of F in a table or by using Excels FDIST, that the regression equation is useful in
predicting the assessed value of office buildings in this area. Remember that it is critical to use correct values of v1 and v2 computed in
the previous paragraph.
Example 5 Calculating the t-Statistics
Another hypothesis test will determine whether each slope coefficient is useful in estimating the assessed value of an office building in
example 3. For example, to test the age coefficient for statistical significance, divide -234.24 (age slope coefficient) by 13.268 (the
estimated standard error of age coefficients in cell A15). The following is the t-observed value:
t = m4 se4 = -234.24 13.268 = -17.7
If the absolute value of t is sufficiently high, it can be concluded that the slope coefficient is useful in estimating the assessed value of
an office building in Example 3. The table below shows the absolute values of the 4 t-observed values.
If you consult a table in a statistics manual, you will find that t-critical, two tailed, with 6 degrees of freedom and Alpha = 0.05 is
2.447. This critical value can also be found using Excels TINV function. TINV(0.05,6) = 2.447. Because the absolute value of t, 17.7, is
greater than 2.447, age is an important variable when estimating the assessed value of an office building. Each of the other
independent variables can be tested for statistical significance in a similar manner. The following are the t-observed values for each of
the independent variables.
These values all have an absolute value greater than 2.447; therefore, all the variables used in the regression equation are useful in
predicting the assessed value of office buildings in this area.<SPAN FPRev
Variable t-observed value
Floor space 5.1
Number of offices 31.3
Number of entrances 4.8
Age 17.7
Page 6of 6 LINEST
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
LOGEST
See Also
In regression analysis, calculates an exponential curve that fits your data and returns an array of values that describes the curve.
Because this function returns an array of values, it must be entered as an array formula.
The equation for the curve is:
y = b*m^x or
y = (b*(m1^x1)*(m2^x2)*_) (if there are multiple x-values)
where the dependent y-value is a function of the independent x-values. The m-values are bases corresponding to each exponent x-
value, and b is a constant value. Note that y, x, and m can be vectors. The array that LOGEST returns is {mn,mn-1,...,m1,b}.
Syntax
LOGEST(known_y's,known_x's,const,stats)
Known_y's is the set of y-values you already know in the relationship y = b*m^x.
If the array known_y's is in a single column, then each column of known_x's is interpreted as a separate variable.
If the array known_y's is in a single row, then each row of known_x's is interpreted as a separate variable.
Known_x's is an optional set of x-values that you may already know in the relationship y = b*m^x.
The array known_x's can include one or more sets of variables. If only one variable is used, known_y's and known_x's can be
ranges of any shape, as long as they have equal dimensions. If more than one variable is used, known_y's must be a range of cells
with a height of one row or a width of one column (which is also known as a vector).
If known_x's is omitted, it is assumed to be the array {1,2,3,...} that is the same size as known_y's.
Const is a logical value specifying whether to force the constant b to equal 1.
If const is TRUE or omitted, b is calculated normally.
If const is FALSE, b is set equal to 1, and the m-values are fitted to y = m^x.
Stats is a logical value specifying whether to return additional regression statistics.
If stats is TRUE, LOGEST returns the additional regression statistics, so the returned array is {mn,mn-1,...,m1,b;sen,sen-
1,...,se1,seb;r 2,sey; F,df;ssreg,ssresid}.
If stats is FALSE or omitted, LOGEST returns only the m-coefficients and the constant b.
For more information about additional regression statistics, see LINEST.
Remarks
The more a plot of your data resembles an exponential curve, the better the calculated line will fit your data. Like LINEST, LOGEST
returns an array of values that describes a relationship among the values, but LINEST fits a straight line to your data; LOGEST fits
an exponential curve. For more information, see LINEST.
When you have only one independent x-variable, you can obtain the slope (m) and y-intercept (b) values directly by using the
following formulas:
Slope (m):
INDEX(LOGEST(known_y's,known_x's),1)
Y-intercept (b):
INDEX(LOGEST(known_y's,known_x's),2)
You can use the y = b*m^x equation to predict future values of y, but Microsoft Excel provides the GROWTH function to do this for
you. For more information, see GROWTH.
Formulas that return arrays must be entered as array formulas.
When entering an array constant such as known_x's as an argument, use commas to separate values in the same row and
semicolons to separate rows. Separator characters may be different depending on your locale setting in Regional Settings or
Regional Options in Control Panel.
You should note that the y-values predicted by the regression equation may not be valid if they are outside the range of y-values
you used to determine the equation.
Example 1 m-coefficients and the constant b
The example may be easier to understand if you copy it to a blank worksheet.
How?
Page 1of 3 LOGEST
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
1. Create a blank workbook or worksheet.
2. Select the example in the Help topic. Do not select the row or column headers.
Selecting an example from Help
3. Press CTRL+C.
4. In the worksheet, select cell A1, and press CTRL+V.
5. To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the
Tools menu, point to Formula Auditing, and then click Formula Auditing Mode.
Note The formula in the example must be entered as an array formula. After copying the example to a blank worksheet, select the
range A9:B9 starting with the formula cell. Press F2, and then press CTRL+SHIFT+ENTER. If the formula is not entered as an array
formula, the single result is 1.463275628.
When entered as an array, the m-coefficients and the constant b are returned.
y = b*m1^x1 or using the values from the array:
y = 495.3 * 1.4633x
You can estimate sales for future months by substituting the month number for x in this equation, or you can use the GROWTH
function.
Example 2 Full statistics
The example may be easier to understand if you copy it to a blank worksheet.
How?
1. Create a blank workbook or worksheet.
2. Select the example in the Help topic. Do not select the row or column headers.
Selecting an example from Help
3. Press CTRL+C.
4. In the worksheet, select cell A1, and press CTRL+V.
5. To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the
Tools menu, point to Formula Auditing, and then click Formula Auditing Mode.
1
2
3
4
5
6
7
A B
Month Units
11 33,100
12 47,300
13 69,000
14 102,000
15 150,000
16 220,000
Formula Formula
=LOGEST(B2:B7,A2:A7, TRUE, FALSE)
Page 2of 3 LOGEST
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
Note The formula in the example must be entered as an array formula. After copying the example to a blank worksheet, select the
range A9:B13 starting with the formula cell. Press F2, and then press CTRL+SHIFT+ENTER. If the formula is not entered as an array
formula, the single result is 1.463275628.
When entered as an array, the following regression statistics are returned. Use this key to identify the statistic you want.
You can use the additional regression statistics (cells A10:B13 in the above output array) to determine how useful the equation is for
predicting future values.
Important The methods you use to test an equation using LOGEST are similar to the methods for LINEST. However, the additional
statistics LOGEST returns are based on the following linear model:
ln y = x1 ln m1 + ... + xn ln mn + ln b
You should keep this in mind when you evaluate the additional statistics, especially the sei and seb values, which should be compared
to ln mi and ln b, not to mi and b. For more information, consult an advanced statistics manual.
1
2
3
4
5
6
7
A B
Month Units
11 33,100
12 47,300
13 69,000
14 102,000
15 150,000
16 220,000
Formula
=LOGEST(B2:B7,A2:A7, TRUE, TRUE)
Page 3of 3 LOGEST
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
LOGI NV
See Also
Returns the inverse of the lognormal cumulative distribution function of x, where ln(x) is normally distributed with parameters
mean and standard_dev. If p = LOGNORMDIST(x,...) then LOGINV(p,...) = x.
Use the lognormal distribution to analyze logarithmically transformed data.
Syntax
LOGINV(probability,mean,standard_dev)
Probability is a probability associated with the lognormal distribution.
Mean is the mean of ln(x).
Standard_dev is the standard deviation of ln(x).
Remarks
If any argument is nonnumeric, LOGINV returns the #VALUE! error value.
If probability < 0 or probability > 1, LOGINV returns the #NUM! error value.
If standard_dev <= 0, LOGINV returns the #NUM! error value.
The inverse of the lognormal distribution function is:
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
A B
Data Description
0.039084 Probability associated with the lognormal distribution
3.5 Mean of ln(x)
1.2 Standard deviation of ln(x)
Formula Description (Result)
=LOGINV(A2, A3, A4) Inverse of the lognormal cumulative distribution function for the terms above (4.000014)
Page 1of 1 LOGINV
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
LOGNORMDI ST
See Also
Returns the cumulative lognormal distribution of x, where ln(x) is normally distributed with parameters mean and standard_dev.
Use this function to analyze data that has been logarithmically transformed.
Syntax
LOGNORMDI ST(x,mean,standard_dev)
X is the value at which to evaluate the function.
Mean is the mean of ln(x).
Standard_dev is the standard deviation of ln(x).
Remarks
If any argument is nonnumeric, LOGNORMDIST returns the #VALUE! error value.
If x
0 or if standard_dev
0 or if any value in prob_range > 1, PROB returns the #NUM! error value.
If the sum of the values in prob_range 1, PROB returns the #NUM! error value.
If upper_limit is omitted, PROB returns the probability of being equal to lower_limit.
If x_range and prob_range contain a different number of data points, PROB returns the #N/A error value.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
5
A B
x Probability
0 0.2
1 0.3
2 0.1
3 0.4
Formula Description (Result)
=PROB(A2:A5,B2:B5,2) Probability that x is 2 (0.1)
=PROB(A2:A5,B2:B5,1,3) Probability that x is between 1 and 3 (0.8)
Page 1of 1 PROB
15/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
QUARTI LE
See Also
Returns the quartile of a data set. Quartiles often are used in sales and survey data to divide populations into groups. For example,
you can use QUARTILE to find the top 25 percent of incomes in a population.
Syntax
QUARTI LE(array,quart)
Array is the array or cell range of numeric values for which you want the quartile value.
Quart indicates which value to return.
Remarks
If array is empty, QUARTILE returns the #NUM! error value.
If quart is not an integer, it is truncated.
If quart < 0 or if quart > 4, QUARTILE returns the #NUM! error value.
MIN, MEDIAN, and MAX return the same value as QUARTILE when quart is equal to 0 (zero), 2, and 4, respectively.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
If quart equals QUARTI LE returns
0 Minimum value
1 First quartile (25th percentile)
2 Median value (50th percentile)
3 Third quartile (75th percentile)
4 Maximum value
1
2
3
4
5
6
7
8
9
A
Data
1
2
4
7
8
9
10
12
Formula Description (Result)
=QUARTILE(A2:A9,1) First quartile (25th percentile) of the data above (3.5)
Page 1of 1 QUARTILE
15/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
RANK
See Also
Returns the rank of a number in a list of numbers. The rank of a number is its size relative to other values in a list. (If you were to
sort the list, the rank of the number would be its position.)
Syntax
RANK(number,ref,order)
Number is the number whose rank you want to find.
Ref is an array of, or a reference to, a list of numbers. Nonnumeric values in ref are ignored.
Order is a number specifying how to rank number.
If order is 0 (zero) or omitted, Microsoft Excel ranks number as if ref were a list sorted in descending order.
If order is any nonzero value, Microsoft Excel ranks number as if ref were a list sorted in ascending order.
Remarks
RANK gives duplicate numbers the same rank. However, the presence of duplicate numbers affects the ranks of subsequent
numbers. For example, in a list of integers sorted in ascending order, if the number 10 appears twice and has a rank of 5, then 11
would have a rank of 7 (no number would have a rank of 6).
For some purposes one might want to use a definition of rank that takes ties into account. In the previous example, one would
want a revised rank of 5.5 for the number 10. This can be done by adding the following correction factor to the value returned by
RANK. This correction factor is appropriate both for the case where rank is computed in descending order (order = 0 or omitted) or
ascending order (order = nonzero value).
Correction factor for tied ranks=[COUNT(ref) + 1 RANK(number, ref, 0) RANK(number, ref, 1)]/2.
In the following example, RANK(A2,A1:A5,1) equals 3. The correction factor is (5 + 1 2 3)/2 = 0.5 and the revised rank that
takes ties into account is 3 + 0.5 = 3.5. If number occurs only once in ref, the correction factor will be 0, since RANK would not
have to be adjusted for a tie.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
5
6
A
Data
7
3.5
3.5
1
2
Formula Description (Result)
=RANK(A3,A2:A6,1) Rank of 3.5 in the list above (3)
=RANK(A2,A2:A6,1) Rank of 7 in the list above (5)
Page 1of 1 RANK
15/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
RSQ
See Also
Returns the square of the Pearson product moment correlation coefficient through data points in known_y's and known_x's. For
more information, see PEARSON. The r-squared value can be interpreted as the proportion of the variance in y attributable to the
variance in x.
Syntax
RSQ(known_y's,known_x's)
Known_y's is an array or range of data points.
Known_x's is an array or range of data points.
Remarks
The arguments must be either numbers or 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.
If known_y's and known_x's are empty or have a different number of data points, RSQ returns the #N/A error value.
The equation for the Pearson product moment correlation coefficient, r, is:
where x and y are the sample means AVERAGE(known_xs) and AVERAGE(known_ys).
RSQ returns r
2
, which is the square of this correlation coefficient.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
5
6
7
8
A B
Known y Known x
2 6
3 5
9 11
1 7
8 5
7 4
5 4
Formula Description (Result)
=RSQ(A2:A8,B2:B8) Square of the Pearson product moment correlation coefficient through data points above (0.05795)
Page 1of 1 RSQ
15/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
SKEW
See Also
Returns the skewness of a distribution. Skewness characterizes the degree of asymmetry of a distribution around its mean.
Positive skewness indicates a distribution with an asymmetric tail extending toward more positive values. Negative skewness
indicates a distribution with an asymmetric tail extending toward more negative values.
Syntax
SKEW(number1,number2,...)
Number1, number2 ... are 1 to 30 arguments for which you want to calculate skewness. You can also use a single array or a
reference to an array instead of arguments separated by commas.
Remarks
The arguments must be either numbers or 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.
If there are fewer than three data points, or the sample standard deviation is zero, SKEW returns the #DIV/0! error value.
The equation for skewness is defined as:
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
5
6
7
8
9
10
11
A
Data
3
4
5
2
3
4
5
6
4
7
Formula Description (Result)
=SKEW(A2:A11) Skewness of a distribution of the data set above (0.359543)
Page 1of 1 SKEW
15/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
SLOPE
See Also
Returns the slope of the linear regression line through data points in known_y's and known_x's. The slope is the vertical distance
divided by the horizontal distance between any two points on the line, which is the rate of change along the regression line.
Syntax
SLOPE(known_y's,known_x's)
Known_y's is an array or cell range of numeric dependent data points.
Known_x's is the set of independent data points.
Remarks
The arguments must be either numbers or 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.
If known_y's and known_x's are empty or have a different number of data points, SLOPE returns the #N/A error value.
The equation for the slope of the regression line is:
where x and y are the sample means AVERAGE(known_xs) and AVERAGE(known_ys).
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
5
6
7
8
A B
Known y Known x
2 6
3 5
9 11
1 7
8 5
7 4
5 4
Formula Description (Result)
=SLOPE(A2:A8,B2:B8) Slope of the linear regression line through the data points above (0.305556)
Page 1of 1 SLOPE
15/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
SMALL
See Also
Returns the k-th smallest value in a data set. Use this function to return values with a particular relative standing in a data set.
Syntax
SMALL(array,k)
Array is an array or range of numerical data for which you want to determine the k-th smallest value.
K is the position (from the smallest) in the array or range of data to return.
Remarks
If array is empty, SMALL returns the #NUM! error value.
If k
0 or if k exceeds the number of data points, SMALL returns the #NUM! error value.
If n is the number of data points in array, SMALL(array,1) equals the smallest value, and SMALL(array,n) equals the largest value.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
5
6
7
8
9
10
A B
Data Data
3 1
4 4
5 8
2 3
3 7
4 12
6 54
4 8
7 23
Formula Description (Result)
=SMALL(A2:A10,4) 4th smallest number in first column (4)
=SMALL(B2:B10,2) 2nd smallest number in the second column (3)
Page 1of 1 SMALL
15/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
STANDARDI ZE
See Also
Returns a normalized value from a distribution characterized by mean and standard_dev.
Syntax
STANDARDI ZE(x,mean,standard_dev)
X is the value you want to normalize.
Mean is the arithmetic mean of the distribution.
Standard_dev is the standard deviation of the distribution.
Remarks
If standard_dev
0 or if beta
0
is the value to test.
Sigma is the population (known) standard deviation. If omitted, the sample standard deviation is used.
Remarks
If array is empty, ZTEST returns the #N/A error value.
ZTEST is calculated as follows when sigma is not omitted:
or when sigma is omitted:
where x is the sample mean AVERAGE(array); s is the sample standard deviation STDEV(array); and n is the number of
observations in the sample COUNT(array).
ZTEST represents the probability that the sample mean would be greater than the observed value AVERAGE(array), when the
underlying population mean is
0
. From the symmetry of the Normal distribution, if AVERAGE(array) <
0
, ZTEST will return a value
greater than 0.5.
The following Excel formula can be used to calculate the two-tailed probability that the sample mean would be further from
0
(in
either direction) than AVERAGE(array), when the underlying population mean is
0
:
=2 * MIN(ZTEST(array,
0
,sigma), 1 - ZTEST(array,
0
,sigma)).
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
5
6
7
8
9
10
11
A
Data
3
6
7
8
6
5
4
2
1
9
Formula Description (Result)
=ZTEST(A2:A11,4) One-tailed probability-value of a z-test for the data set above, at the hypothesized
population mean of 4 (0.090574)
Page 1of 2 ZTEST
15/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
=2 * MIN(ZTEST(A2:A11,4), 1 - ZTEST
(A2:A11,4))
Two-tailed probability-value of a z-test for the data set above, at the hypothesized
population mean of 4 (0.181149)
=ZTEST(A2:A11,6) One-tailed probability-value of a z-test for the data set above, at the hypothesized
population mean of 6 (0.863043)
=2 * MIN(ZTEST(A2:A11,6), 1 - ZTEST
(A2:A11,6))
Two-tailed probability-value of a z-test for the data set above, at the hypothesized
population mean of 6 (0.273913)
Page 2of 2 ZTEST
15/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
BAHTTEXT
See Also
Converts a number to Thai text and adds a suffix of "Baht."
In Microsoft Excel for Windows, you can change the Baht format to a different style by using Regional Settings or Regional
Options in Control Panel.
In Excel for the Macintosh, you can change the Baht number format to a different style by using Control Panel for Numbers.
Syntax
BAHTTEXT(number)
Number is a number you want to convert to text, or a reference to a cell containing a number, or a formula that evaluates to a
number.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
A
Data
1234
Formula Description (Result)
=BAHTTEXT(A2) Displays the number in text. (One thousand two hundred thirty four Baht in Thai text)
Page 1of 1 BAHTTEXT
13/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
CHAR
See Also
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.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
Operating environment Character set
Macintosh Macintosh character set
Windows ANSI
1
2
3
A B
Formula Description (Result)
=CHAR(65) Displays the 65 character in the set (A)
=CHAR(33) Displays the 33 character in the set (!)
Page 1of 1 CHAR
13/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
CLEAN
See Also
Removes all nonprintable characters from text. Use CLEAN on text imported from other applications that contains characters that
may not print with your operating system. For example, you can use CLEAN to remove some low-level computer code that is
frequently at the beginning and end of data files and cannot be printed.
Syntax
CLEAN(text)
Text is any worksheet information from which you want to remove nonprintable characters.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
A
Data
=CHAR(7)&"text"&CHAR(7)
Formula Description (Result)
=CLEAN(A2) Removes the nonprintable character, CHAR(7), from the string above (text)
Page 1of 1 CLEAN
13/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
CODE
See Also
Returns a numeric code for the first character in a text string. The returned code corresponds to the character set used by your
computer.
Syntax
CODE(text)
Text is the text for which you want the code of the first character.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1. Create a blank workbook or worksheet.
2. Select the example in the Help topic. Do not select the row or column headers.
Selecting an example from Help
3. Press CTRL+C.
4. In the worksheet, select cell A1, and press CTRL+V.
5. To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the
Tools menu, point to Formula Auditing, and then click Formula Auditing Mode.
Operating environment Character set
Macintosh Macintosh character set
Windows ANSI
1
2
3
A B
Formula Description (Result)
=CODE("A") Displays the numeric code for A (65)
=CODE("!") Displays the numeric code for ! (33)
Page 1of 1 CODE
13/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
CONCATENATE
See Also
J oins several text strings into one text string.
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.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
A
Data
brook trout
species
32
Formula Description
=CONCATENATE("Stream population for ",A2," ",A3,"
is ",A4,"/mile")
Concatenates a sentence from the data above (Stream population for
brook trout species is 32/mile)
Page 1of 1 CONCATENATE
13/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
DOLLAR
See Also
The function described in this Help topic converts a number to text format and applies a currency symbol. The name of the
function (and the symbol that it applies) depends upon your language settings.
This function converts a number to text using currency format, with the decimals rounded to the specified place. The format used is
$#,##0.00_);($#,##0.00).
Syntax
DOLLAR(number,decimals)
Number is a number, a reference to a cell containing a number, or a formula that evaluates to a number.
Decimals is the number of digits to the right of the decimal point. If decimals is negative, number is rounded to the left of the
decimal point. If you omit decimals, it is assumed to be 2.
Remark
The major difference between formatting a cell that contains a number with the Cells command (Format menu) and formatting a
number directly with the DOLLAR function is that DOLLAR converts its result to text. A number formatted with the Cells command is
still a number. You can continue to use numbers formatted with DOLLAR in formulas, because Microsoft Excel converts numbers
entered as text values to numbers when it calculates.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
5
A
Data
1234.567
-1234.567
-0.123
99.888
Formula Description (Result)
=DOLLAR(A2, 2) Displays the first number in a currency format, 2 digits to the right of the decimal point ($1,234.57)
=DOLLAR(A2, -2) Displays the first number in a currency format, 2 digits to the left of the decimal point ($1,200)
=DOLLAR(A3, -2) Displays the second number in a currency format, 2 digits to the left of the decimal point (($1,200))
=DOLLAR(A4, 4) Displays the third number in a currency format, 4 digits to the right of the decimal point(($0.1230))
=DOLLAR(A5) Displays the fourth number in a currency format, 2 digit to the left of the decimal point ($99.89)
Page 1of 1 DOLLAR
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
EXACT
See Also
Compares two text strings and returns TRUE if they are exactly the same, FALSE otherwise. EXACT is case-sensitive 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.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
A B
First string Second string
word 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)
Page 1of 1 EXACT
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
FI ND
See Also
Also applies to:
FI NDB
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. You can also use SEARCH to find one text string within another, but unlike SEARCH,
FIND is case sensitive and doesn't allow wildcard characters.
FINDB finds one text string (find_text) within another text string (within_text), and returns the number of the starting position of
find_text, based on the number of bytes each character uses, from the first character of within_text. This function is for use with
double-byte characters. You can also use SEARCHB to find one text string within another.
Syntax
FI ND(find_ text,within_text,start_num)
FI NDB(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. I f you omit
start_num, it is assumed to be 1.
Tip
Use start_num to skip a specified number of characters. For example, suppose you are working with the text string
"AYF0093.YoungMensApparel". To find the number of the first "Y" in the descriptive part of the text string, set start_num equal to 8 so
that the serial-number portion of the text is not searched. FIND begins with character 8, finds find_text at the next character, and
returns the number 9. FIND always returns the number of characters from the start of within_text, counting the characters you skip if
start_num is greater than 1.
Remarks
If find_text is "" (empty text), FIND matches the first character in the search string (that is, the character numbered start_num or
1).
Find_text cannot contain any wildcard characters.
If find_text does not appear in within_text, FIND and FINDB return the #VALUE! error value.
If start_num is not greater than zero, FIND and FINDB return the #VALUE! error value.
If start_num is greater than the length of within_text, FIND and FINDB return the #VALUE! error value.
Example 1 (FI ND)
The example may be easier to understand if you copy it to a blank worksheet.
How?
Example 2 (FI ND)
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
A
Data
Miriam McGovern
Formula Description (Result)
=FIND("M",A2) Position of the first "M" in the string above (1)
=FI ND("m",A2) Position of the first "m" in the string above (6)
=FIND("M",A2,3) Position of the first "M" in the string above, starting with the third character (8)
1
A
Data
Page 1of 2 FIND
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
Example (FI NDB)
In the following examples, FIND returns 2 because "" is in the second position within the string, and FINDB returns 3 because each
character is counted by its bytes; the first character has 2 bytes, so the second character begins at byte 3.
=FI ND( " " , " " ) equals 2
=FI NDB(" " , " " ) equals 3
2
3
4
Ceramic I nsulators #124-TD45-
87
Copper Coils #12-671-6772
Variable Resistors #116010
Formula Description (Result)
=MI D(A2,1,FIND(" #",A2,1)-1) Extracts text from position 1 to the position of "#" in the first string above (Ceramic
Insulators)
=MI D(A3,1,FIND(" #",A3,1)-1) Extracts text from position 1 to the position of "#" in the second string above (Copper Coils)
=MI D(A4,1,FIND(" #",A4,1)-1) Extracts text from position 1 to the position of "#" in the third string above (Variable Resistors)
Page 2of 2 FIND
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
FI XED
See Also
Rounds a number to the specified number of decimals, formats the number in decimal format using a period and commas, and
returns the result as text.
Syntax
FI XED(number,decimals,no_commas)
Number is the number you want to round and convert to text.
Decimals is the number of digits to the right of the decimal point.
No_commas is a logical value that, if TRUE, prevents FIXED from including commas in the returned text.
Remarks
Numbers in Microsoft Excel can never have more than 15 significant digits, but decimals can be as large as 127.
If decimals is negative, number is rounded to the left of the decimal point.
If you omit decimals, it is assumed to be 2.
If no_commas is FALSE or omitted, then the returned text includes commas as usual.
The major difference between formatting a cell containing a number with the Cells command (Format menu) and formatting a
number directly with the FIXED function is that FIXED converts its result to text. A number formatted with the Cells command is
still a number.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
A
Data
1234.567
-1234.567
44.332
Formula Description (Result)
=FI XED(A2, 1) Rounds the first number 1 digit to the right of the decimal point (1,234.6)
=FIXED(A2, -1) Rounds the first number 1 digit to the left of the decimal point (1,230)
=FI XED(-1234.567, -1, TRUE) Rounds the second number 1 digit to the left of the decimal point, without commas (-1230)
=FI XED(44.332) Rounds the third number 2 digits to the left of the decimal point (44.33)
Page 1of 1 FIXED
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
FI XED
See Also
Rounds a number to the specified number of decimals, formats the number in decimal format using a period and commas, and
returns the result as text.
Syntax
FI XED(number,decimals,no_commas)
Number is the number you want to round and convert to text.
Decimals is the number of digits to the right of the decimal point.
No_commas is a logical value that, if TRUE, prevents FIXED from including commas in the returned text.
Remarks
Numbers in Microsoft Excel can never have more than 15 significant digits, but decimals can be as large as 127.
If decimals is negative, number is rounded to the left of the decimal point.
If you omit decimals, it is assumed to be 2.
If no_commas is FALSE or omitted, then the returned text includes commas as usual.
The major difference between formatting a cell containing a number with the Cells command (Format menu) and formatting a
number directly with the FIXED function is that FIXED converts its result to text. A number formatted with the Cells command is
still a number.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
A
Data
1234.567
-1234.567
44.332
Formula Description (Result)
=FI XED(A2, 1) Rounds the first number 1 digit to the right of the decimal point (1,234.6)
=FIXED(A2, -1) Rounds the first number 1 digit to the left of the decimal point (1,230)
=FI XED(-1234.567, -1, TRUE) Rounds the second number 1 digit to the left of the decimal point, without commas (-1230)
=FI XED(44.332) Rounds the third number 2 digits to the left of the decimal point (44.33)
Page 1of 1 FIXED
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
LEFT
See Also
Also applies to:
LEFTB
LEFT returns the first character or characters in a text string, based on the number of characters you specify.
LEFTB returns the first character or characters in a text string, based on the number of bytes you specify. This function is for use with
double-byte characters.
Syntax
LEFT(text,num_chars)
LEFTB(text,num_bytes)
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.
Num_chars must be greater than or equal to zero.
If num_chars is greater than the length of text, LEFT returns all of text.
If num_chars is omitted, it is assumed to be 1.
Num_bytes specifies the number of characters you want LEFTB to extract, based on bytes.
Example (LEFT)
The example may be easier to understand if you copy it to a blank worksheet.
How?
Example (LEFTB)
LEFTB( " " , 4) equal s " "
1
2
3
A
Data
Sale Price
Sweden
Formula Description (Result)
=LEFT(A2,4) First four characters in the first string (Sale)
=LEFT(A3) First character in the second string (S)
Page 1of 1 LEFT
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
LEN
See Also
Also applies to:
LENB
LEN returns the number of characters in a text string.
LENB returns the number of bytes used to represent the characters in a text string. This function is for use with double-byte
characters.
Syntax
LEN(text)
LENB(text)
Text is the text whose length you want to find. Spaces count as characters.
Example (LEN)
The example may be easier to understand if you copy it to a blank worksheet.
How?
Example (LENB)
=LENB( " " ) equals 6
1
2
3
4
A
Data
Phoenix, AZ
One
Formula Description (Result)
=LEN(A2) Length of the first string (11)
=LEN(A3) Length of the second string (0)
=LEN(A4) Length of the third string, which includes 5 spaces (8)
Page 1of 1 LEN
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
LOWER
See Also
Converts all uppercase letters in a text string to lowercase.
Syntax
LOWER(text)
Text is the text you want to convert to lowercase. LOWER does not change characters in text that are not letters.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
A
Data
E. E. Cummings
Apt. 2B
Formula Description (Result)
=LOWER(A2) Lower case of first string (e. e. cummings)
=LOWER(A3) Lower case of last string (apt. 2b)
Page 1of 1 LOWER
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
MI D
See Also
Also applies to:
MI DB
MI D returns a specific number of characters from a text string, starting at the position you specify, based on the number of characters
you specify.
MI DB returns a specific number of characters from a text string, starting at the position you specify, based on the number of bytes you
specify. This function is for use with double-byte characters.
Syntax
MI D(text,start_num,num_chars)
MI DB(text,start_num,num_bytes)
Text is the text string containing the characters you want to extract.
Start_num is the position of the first character you want to extract in text. The first character in text has start_num 1, and so on.
Num_chars specifies the number of characters you want MID to return from text.
Num_bytes specifies the number of characters you want MIDB to return from text, in bytes.
Remarks
If start_num is greater than the length of text, MID returns "" (empty text).
If start_num is less than the length of text, but start_num plus num_chars exceeds the length of text, MID returns the characters
up to the end of text.
If start_num is less than 1, MID returns the #VALUE! error value.
If num_chars is negative, MID returns the #VALUE! error value.
If num_bytes is negative, MIDB returns the #VALUE! error value.
Example (MI D)
The example may be easier to understand if you copy it to a blank worksheet.
How?
Example (MI DB)
=MI DB( " " , 1, 6) equals " "
1
2
A
Data
Fluid Flow
Formula Description (Result)
=MI D(A2,1,5) Five characters from the string above, starting at the first character (Fluid)
=MI D(A2,7,20) Twenty characters from the string above, starting at the seventh (Flow)
=MI D(A2,20,5) Because the starting point is greater than the length of the string, empty text is returned ()
Page 1of 1 MID
14/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
PROPER
See Also
Capitalizes the first letter in a text string and any other letters in text that follow any character other than a letter. Converts all
other letters to lowercase letters.
Syntax
PROPER(text)
Text is text enclosed in quotation marks, a formula that returns text, or a reference to a cell containing the text you want to partially
capitalize.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
A
Data
this is a TITLE
2-cent's worth
76BudGet
Formula Description (Result)
=PROPER(A2) Proper case of first string (This Is A Title)
=PROPER(A3) Proper case of second string (2-Cent'S Worth)
=PROPER(A4) Proper case of third string (76Budget)
Page 1of 1 PROPER
15/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
REPLACE
See Also
Also applies to:
REPLACEB
REPLACE replaces part of a text string, based on the number of characters you specify, with a different text string.
REPLACEB replaces part of a text string, based on the number of bytes you specify, with a different text string. This function is for use
with double-byte characters.
Syntax
REPLACE(old_text,start_num,num_chars,new_text)
REPLACEB(old_text,start_num,num_bytes,new_text)
Old_text is text in which you want to replace some characters.
Start_num is the position of the character in old_text that you want to replace with new_text.
Num_chars is the number of characters in old_text that you want REPLACE to replace with new_text.
Num_bytes is the number of bytes in old_text that you want REPLACEB to replace with new_text.
New_text is the text that will replace characters in old_text.
Example (REPLACE)
The example may be easier to understand if you copy it to a blank worksheet.
How?
Example (REPLACEB)
In the following example, the first three double-byte characters in cell C4 are replaced with " ":
=REPLACEB( C4, 1, 6, " " )
1
2
3
4
A
Data
abcdefghijk
2009
123456
Formula Description (Result)
=REPLACE(A2,6,5,"*") Replaces five characters, starting with the sixth character (abcde*k)
=REPLACE(A3,3,2,"10") Replaces the last two digits of 2009 with 10 (2010)
=REPLACE(A4,1,3,"@") Replaces the first three characters with @ (@456)
Page 1of 1 REPLACE
15/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
REPT
See Also
Repeats text a given number of times. Use REPT to fill a cell with a number of instances of a text string.
Syntax
REPT(text,number_times)
Text is the text you want to repeat.
Number_times is a positive number specifying the number of times to repeat text.
Remarks
I f number_times is 0 (zero), REPT returns "" (empty text).
If number_times is not an integer, it is truncated.
The result of the REPT function cannot be longer than 32,767 characters, or REPT returns #VALUE!.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
A B
Formula Description (Result)
=REPT("*-", 3) Displays the string 3 times (*-*-*-)
=REPT("-",10) Displays a dash 10 times (----------)
Page 1of 1 REPT
15/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
RI GHT
See Also
Also applies to:
RI GHTB
RIGHT returns the last character or characters in a text string, based on the number of characters you specify.
RIGHTB returns the last character or characters in a text string, based on the number of bytes you specify. This function is for use with
double-byte characters.
Syntax
RI GHT(text,num_chars)
RI GHTB(text,num_bytes)
Text is the text string containing the characters you want to extract.
Num_chars specifies the number of characters you want RIGHT to extract.
Num_bytes specifies the number of characters you want RIGHTB to extract, based on bytes.
Remarks
Num_chars must be greater than or equal to zero.
If num_chars is greater than the length of text, RIGHT returns all of text.
If num_chars is omitted, it is assumed to be 1.
Example (RI GHT)
The example may be easier to understand if you copy it to a blank worksheet.
How?
Example (RI GHTB)
=RIGHTB(" " , 2) equals " "
1
2
3
A
Data
Sale Price
Stock Number
Formula Description (Result)
=RI GHT(A2,5) Last 5 characters of the first string (Price)
=RI GHT(A3) Last character of the second string (r)
Page 1of 1 RIGHT
15/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
SEARCH
See Also
Also applies to:
SEARCHB
SEARCH returns the number of the character at which a specific character or text string is first found, beginning with start_num. Use
SEARCH to determine the location of a character or text string within another text string so that you can use the MID or REPLACE
functions to change the text.
SEARCHB also finds one text string (find_text) within another text string (within_text), and returns the number of the starting position
of find_text. The result is based on the number of bytes each character uses, beginning with start_num. This function is for use with
double-byte characters You can also use FINDB to find one text string within another.
Syntax
SEARCH(find_text,within_text,start_num)
SEARCHB(find_text,within_text,start_num)
Find_text is the text you want to find. You can use the wildcard characters, question mark (?) and asterisk (*), in find_text. A
question mark matches any single character; an asterisk matches any sequence of characters. If you want to find an actual question
mark or asterisk, type a tilde (~) before the character.
Within_text is the text in which you want to search for find_text.
Start_num is the character number in within_text at which you want to start searching.
Tip
Use start_num to skip a specified number of characters. For example, suppose you are working with the text string
"AYF0093.YoungMensApparel". To find the number of the first "Y" in the descriptive part of the text string, set start_num equal to 8 so
that the serial-number portion of the text is not searched. SEARCH begins with character 8, finds find_text at the next character, and
returns the number 9. SEARCH always returns the number of characters from the start of within_text, counting the characters you skip
if start_num is greater than 1.
Remarks
SEARCH and SEARCHB do not distinguish between uppercase and lowercase letters when searching text.
SEARCH and SEARCHB are similar to FIND and FINDB, except that FIND and FINDB are case sensitive.
If find_text is not found, the #VALUE! error value is returned.
If start_num is omitted, it is assumed to be 1.
If start_num is not greater than 0 (zero) or is greater than the length of within_text, the #VALUE! error value is returned.
Example (SEARCH)
The example may be easier to understand if you copy it to a blank worksheet.
How?
Example (SEARCHB)
In the following examples, SEARCH returns 2 because "" is in the second position within the string, and SEARCHB returns 3 because
each character is counted by its bytes; the first character has 2 bytes, so the second character begins at byte 3.
=SEARCH( " " , " " ) equals 2
1
2
3
4
A
Data
Statements
Profit Margin
margin
Formula Description (Result)
=SEARCH("e",A2,6) Position of the first "e" in the first string above, starting at the sixth position (7)
=SEARCH(A4,A3) Position of "margin" in "Profit Margin" (8)
=REPLACE(A3,SEARCH(A4,A3),6,"Amount") Replaces "Margin" with "Amount" (Profit Amount)
Page 1of 2 SEARCH
15/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
=SEARCHB(" " , " " ) equals 3
Page 2of 2 SEARCH
15/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
T
See Also
Returns the text referred to by value.
Syntax
T(value)
Value is the value you want to test.
Remarks
If value is or refers to text, T returns value. If value does not refer to text, T returns "" (empty text).
You do not generally need to use the T function in a formula because Microsoft Excel automatically converts values as necessary.
This function is provided for compatibility with other spreadsheet programs.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
4
A
Data
Rainfall
19
TRUE
Formula Description (Result)
=T(A2) Because the first value is text, the text is returned (Rainfall)
=T(A3) Because the second value is a number, empty text is returned ()
=T(A4) Because the third value is a logical value, empty text is returned ()
Page 1of 1 T
15/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
TEXT
See Also
Converts a value to text in a specific number format.
Syntax
TEXT(value,format_text)
Value is a numeric value, a formula that evaluates to a numeric value, or a reference to a cell containing a numeric value.
Format_text is a number format in text form from in the Category box on the Number tab in the Format Cells dialog box.
Remarks
Format_text cannot contain an asterisk (*).
Formatting a cell with an option on the Number tab (Cells command, Format menu) changes only the format, not the value.
Using the TEXT function converts a value to formatted text, and the result is no longer calculated as a number.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
A B
Salesperson Sales
Buchanan 2800
Dodsworth 40%
Formula Description (Result)
=A2&" sold "&TEXT(B2, "$0.00")&" worth of
units."
Combines contents above into a phrase (Buchanan sold $2800.00 worth of
units.)
=A3&" sold "&TEXT(B3,"0%")&" of the total
sales."
Combines contents above into a phrase (Dodsworth sold 40% of the total
sales.)
Page 1of 1 TEXT
15/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
TRI M
See Also
Removes all spaces from text except for single spaces between words. Use TRIM on text that you have received from another
application that may have irregular spacing.
Syntax
TRI M(text)
Text is the text from which you want spaces removed.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1. Create a blank workbook or worksheet.
2. Select the example in the Help topic. Do not select the row or column headers.
Selecting an example from Help
3. Press CTRL+C.
4. In the worksheet, select cell A1, and press CTRL+V.
5. To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the
Tools menu, point to Formula Auditing, and then click Formula Auditing Mode.
1
2
A B
Formula Description (Result)
=TRI M(" First Quarter Earnings ") Removes leading and trailing spaces from the text in the formula (First Quarter Earnings)
Page 1of 1 TRIM
15/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
UPPER
See Also
Converts text to uppercase.
Syntax
UPPER(text)
Text is the text you want converted to uppercase. Text can be a reference or text string.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
1
2
3
A
Data
total
Yield
Formula Description (Result)
=UPPER(A2) Upper case of first string (TOTAL)
=UPPER(A3) Upper case of second string (YIELD)
Page 1of 1 UPPER
15/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...
VALUE
See Also
Converts a text string that represents a number to a number.
Syntax
VALUE(text)
Text is the text enclosed in quotation marks or a reference to a cell containing the text you want to convert.
Remarks
Text can be in any of the constant number, date, or time formats recognized by Microsoft Excel. If text is not in one of these
formats, VALUE returns the #VALUE! error value.
You do not generally need to use the VALUE function in a formula because Excel automatically converts text to numbers as
necessary. This function is provided for compatibility with other spreadsheet programs.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How?
Note To view the number as a time, select the cell and click Cells on the Format menu. Click the Number tab, and then click Time
in the Category box.
1
2
3
A B
Formula Description (Result)
=VALUE("$1,000") Number equivalent of the string (1000)
=VALUE("16:48:00")-VALUE
("12:00:00")
The serial number equivalent to 4 hours and 48 minutes, which is "16:48:00"-
"12:00:00" (0.2 or 4:48)
Page 1of 1 VALUE
15/12/05 mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\OFFICE11\1033\xlmain11.ch...