Usethe DCOUNT function to count all cells that contain numbers in acolumn of a list or database that match specified conditions.. DCOUNTdatabase, field, criteria database: The range of c
Trang 1Use the SYD function to calculate depreciation
In this tip, we calculate the depreciation of an investment To do so,use the SYD function, which returns the sum-of-years’ digits depre-ciation of an asset for a specified period
SYD(cost, salvage, life, per)
cost: The asset’s initial cost.
salvage: The value of the asset at the end of the deprecation life: The number of periods over which the asset is depreciated per: The period per must use the same units as life.
4 To calculate depreciation:
1 In cell B1 enter the cost of purchase
2 In cell B2 enter in years the number of periods over whichthe purchase will be depreciated
3 Enter the salvage value in cell B3
4 Calculate the depreciation in the fifth year in cell B5 with
the following formula: =SYD($B$1,$B$3,$B$2,5).
Trang 2Use the SLN function to calculate straight-line
depreciation
Here we want to calculate the straight-line depreciation of an
investment Use the SLN function, which returns the straight-linedepreciation of an asset for one period
SLN(cost, salvage, life)
cost: The asset’s initial cost.
salvage: The value of the asset at the end of the depreciation.
life: The number of periods over which the asset is depreciated.
4 To calculate depreciation:
1 In cell B1 enter the initial cost
2 In cell B2 enter the number of periods as years
3 Enter the salvage in cell B3
4 Calculate the depreciation in the fifth year in cell B5 with
the following formula: =SLN($B$1,$B$3,$B$2).
5 Press <Enter>.
Figure 7-2
Trang 3Use the PV function to decide amount to invest
In this example you have to decide on the amount of money youwant to invest To solve this problem, you use the PV function,which returns the present value of an investment This is the totalamount that a series of future payments is worth now
PV(rate, nper, pmt, fv, type)
rate: The interest rate per period.
nper: The total number of payment periods in an annuity pmt: The payment made each period, which is a constant value fv: The future value This is the amount you want after the last
payment is made
type: A number that indicates when payments are due 0 or
omitted indicates the end of the period, and 1 indicates thebeginning of the period
4 To decide how much to invest:
1 In cell C1 enter the estimated return per year
2 In cell C2 enter the number of periods in years
3 Enter the interest rate in cell C3
4 Calculate the maximum investment amount in cell C4 with
the following formula: =PV(C3,C2,C1).
5 Press <Enter>.
Figure 7-3
Trang 4Use the PV function to compare investments
Two investments have to be compared The amount of each ment, the number of periods, the interest, and the estimated returnare given To calculate and compare, use the PV function as
invest-described below
4 To compare investments:
1 In cells B2 and C2 enter the investment amounts
2 In cells B3 and C3 enter the interest rates
3 In cells B4 and C4 enter the number of periods
4 In cells B5 and C5 enter the estimated return of each
Note: Investment 2 is more expensive than Investment 1.
Figure 7-4
Trang 5Use the DDB function to calculate using the double-declining balance method
The DDB function returns the depreciation of an asset for a fied period, using the double-declining balance method or someother method that can be specified
speci-DDB(cost, salvage, life, period, factor)
cost: The asset’s initial cost.
salvage: The value of the asset at the end of the depreciation life: The number of periods over which the asset is being
depreciated
period: The period for which the depreciation is being
calculated
factor: The rate at which the balance declines If factor is
omit-ted, it is assumed to be 2, which specifies the double-decliningbalance method
4 To use the double-declining balance method:
1 Enter the initial cost in cell B1, the number of periods incell B2, and the salvage in cell B3
2 Calculate the depreciation in the fifth year in cell B4 with
the following formula: =DDB($B$1,$B$3,$B$2,5).
3 To calculate the depreciation after one day, type this
for-mula in cell B5: =DDB($B$1,$B$3,$B$2*365,1).
4 To calculate the depreciation after the first month, use this
formula in cell B6: =DDB($B$1,$B$3,$B$2*12,1).
Trang 6Basic Financial Functions 193
Figure 7-5
Trang 7Use the PMT function to determine the
payment of a loan
To determine the payment amount for a loan based on constant ments and a constant interest rate, use the PMT function
pay-PMT(rate, nper, pv, fv, type)
rate: The interest rate of the loan.
nper: The total number of payments for the loan.
pv: The present value This is also referred to as the principal fv: The future value This is the amount you want after the last
payment is made If fv is omitted, it is assumed to be 0.
type: A number that indicates when payments are due 0 or
omitted indicates the end of the period, and 1 indicates thebeginning of the period
4 To determine the payment for a loan:
1 In cell B1 enter the interest rate
2 In cell B2 enter the number of periods in months
3 In cell B3 enter the amount of the loan
4 In cell B5 calculate the payment after one month with the
following formula: =-PMT($B$1/12,$B$2,$B$3).
5 Press <Enter>.
Figure 7-6
Trang 8Use the FV function to calculate total savings
ques-FV(rate, nper, pmt, pv, type)
rate: The interest rate per period.
nper: The total number of payment periods in an annuity.
pmt: The payment made each period, which is a constant value pv: The present value This is the amount that a series of future
payments is worth right now
type: A number that indicates when payments are due 0
indi-cates the end of the period, and 1 indiindi-cates the beginning of theperiod
4 To calculate the total of an account with regular deposits
and a constant interest rate:
1 Enter the current interest rate in cell B1 and the number ofperiods in cell B2
2 In cell B3 enter the monthly amount to be put in the
Trang 9196 Chapter 7
Figure 7-7
Trang 10Use the RATE function to calculate interest rate
Let’s say a bank advertises that if you deposit $500 each month for
12 years, you will have $100,000 at the end of the period What is
the interest rate the bank is paying? To answer this question, use
the RATE function, which returns the interest rate per period of anannuity
RATE(nper, pmt, pv, fv, type, guess)
nper: The total number of payment periods in an annuity.
pmt: The payment made each period, which is a constant value pv: The present value This is the amount that a series of future
payments is worth right now
fv: The future value This is the amount you want after the last
payment is made
type: A number that indicates when payments are due 0 or
omitted indicates the end of the period, and 1 indicates the
beginning of the period
guess: A guess for what the interest rate will be If omitted,
Excel uses 10%
4 To calculate the interest rate:
1 In cell B1 enter the number of periods in years
2 In cell B2 enter the monthly amount to deposit
3 In cell B3 enter the final value the bank has advertised
4 In cell B5 type the following formula:
Trang 11This page intentionally left blank.
Trang 12Chapter 8
Database Functions
199
Trang 13Use the DCOUNT function to count special cells
Using this tip, cells in a list can be counted by specific criteria Usethe DCOUNT function to count all cells that contain numbers in acolumn of a list or database that match specified conditions
DCOUNT(database, field, criteria)
database: The range of cells in the list or database The first
row of the list contains column headings
field: Indicates the column to use in the function field can be
provided as text with the column heading enclosed in doublequotation marks or as a number representing the position of thecolumn within the list: 1 for the first column, 2 for the secondcolumn, and so on
criteria: The range of cells containing the specified conditions.
Any range can be used for the criteria argument, as long as it
includes at least one column heading and at least one cell belowthe column heading to specify a condition
Use the following data for this tip
Figure 8-1
Trang 14You can manually count all products in the vegetable category with
a price less than or equal to $2.50, or you can let Excel to the
counting as described next:
4 To count special cells:
1 Copy the range A1:E1 as shown in the preceding figure
2 Select cell A14 and press <Ctrl+V>.
3 Select cell C15 and type vegetable.
4 In cell E15 type <=2.50 to define the search criteria.
5 In cell C17 type the following formula:
=DCOUNT(A1:E11,E14,A14:E15).
6 Press <Enter>.
Note: The category in cell C15 can be changed To count
several categories, just type meat in cell C16 and change the
formula in cell A17 to this:=DCOUNT(A1:E11,E14,A14:E16).
Figure 8-2
Trang 15Use the DCOUNT function to count cells in a
range between x and y
Use the data in the previous example to continue working with theDCOUNT function Here we want to count all products of the vege-table category that cost more than $1.75 but less than or equal to
$2.50
4 To count cells in a specific range between x and y:
1 Copy range A1:E1
2 Select cell A14 and paste the copied cells with <Ctrl+V>.
3 Select cell C15 and type vegetable.
4 In cell E15 type >1.75.
Trang 16Use the DCOUNTA function to count all cells
beginning with the same character
Continuing with the previous example, now we want to count all
cells that begin with the letter “b,” like bread, beef steak, and
bananas To do this, use the DCOUNTA function, which counts thenonblank cells in a column of a list or database that match the speci-fied conditions
The arguments are the same as used with the DCOUNT
function
4 To count cells beginning with the letter “b”:
1 Copy range A1:E1
2 Select cell A14 and press <Ctrl+V>.
Trang 17Use the DGET function to search for a
product number
In this example, enter a product number to let Excel search a listfor the corresponding product To do so, use the DGET function,which selects a value from a column of a list or database that
matches specified conditions
DGET(database, field, criteria)
database: The range of cells in the list or database The first
row of the list contains column headings
field: Indicates the column to use in the function field can be
provided as text with the column heading enclosed in doublequotation marks or as a number representing the position of thecolumn within the list
criteria: The range of cells containing the specified conditions.
4 To search for a product number:
1 Copy the range A1:B1
2 Select cell D1 and press <Ctrl+V>.
3 In cell D2 enter the number 13.
4 In cell E2 type the following formula:
=DGET(A1:B10,E1,D1:D2).
5 Press <Enter>.
Figure 8-5
Trang 18Use the DMAX function to find the most
expensive product in a category
This tip shows how to determine the most expensive product in alist specified by a category using the DMAX function This functionreturns the largest number in a column of a list or database that
matches specified conditions
DMAX(database, field, criteria)
database: The range of cells in the list or database The first
row of the list contains column headings
field: Indicates the column to use in the function.
criteria: The range of cells containing the specified conditions.
4 To find the most expensive vegetable:
1 Copy the range A1:E1
2 Select cell A14 and press <Ctrl+V>.
3 In cell C15 enter vegetable as the search criteria.
4 In cell E17 type the following formula:
Trang 19Use the DMIN function to find the least
expensive product
For this example, use the same list of food products to determinethe least expensive fruit To do so, use the DMIN function to returnthe smallest number in a column of a list or database that matchesspecified conditions
DMIN(database, field, criteria)
database: The range of cells in the list or database The first
row of the list contains column headings
field: Indicates the column to use in the function.
criteria: The range of cells containing the specified conditions.
4 To find the least expensive fruit:
1 Copy range A1:E1
2 Select cell A14 and press <Ctrl+V>.
3 In cell C15 enter fruit as the search criteria.
4 In cell E17 type the following formula:
=DMIN(A1:E11,E14,A14:E15).
5 Press <Enter>.
Figure 8-7
Trang 20Use the DMIN function to find the oldest
person on a team
The oldest member of a team can be found by using the DMIN
function (To find the youngest person, use DMAX.) Dates are
stored in Excel as integer values beginning with 1 for January 1,
1900, and incrementing by 1 for each subsequent day For example,the date 11/16/2004 has the value 38307 The syntax for DMIN is
described in the previous tip
4 To find the oldest person on a team:
1 Copy to a worksheet cells A1:C10 as shown in Figure 8-8
2 Copy the range A1:C1
3 Select cell A12 and press <Ctrl+V>.
4 In cell B13 enter 1 to search just inside team 1.
5 In cell C15 type the following formula:
=DMIN(A1:C10,B1,A12:C13).
Figure 8-8
Trang 21Use the DSUM function to sum sales of a period
Sometimes a list has to be summed up if it matches particular ditions For example, you might want to sum sales in a certaincategory or for a specified time period Use the DSUM function,which adds the numbers in a column of a list or database thatmatches specified conditions
con-DSUM(database, field, criteria)
database: The range of cells in the list or database The first
row of the list contains column headings
field: Indicates the column to use in the function.
criteria: The range of cells containing the specified conditions.
4 To sum sales for a particular time period:
1 Copy to a worksheet cells A2:C10 as shown in Figure 8-9
2 Copy the range A1:C1
3 Select cell A12 and press <Ctrl+V>.
4 In cell D12 type date.
5 Fill in the criteria range as shown in cells A13:D13
6 In cell D15 type the following formula:
=DSUM(A1:C10,C1,A12:D13).
7 Press <Enter>.
Figure 8-9
Trang 22Use the DSUM function to sum all prices of a
category that are above a particular level
The list in the following figure shows the prices of a number of
goods in different categories To sum up all prices in one categorythat are above a particular price, use the DSUM function Here wewill sum up all prices of category A that are above $100
4 To sum all prices of category A above $100:
1 Copy to a worksheet cells A1:C10 as shown in Figure 8-10
2 Copy range A1:C1
3 Select cell A12 and press <Ctrl+V>.
4 In cell B13 enter A to search inside category A.
5 In cell C13 type the argument >100.
6 In cell D15 type the following formula:
Trang 23Use the DAVERAGE function to determine the average price of a category
To determine the average price of a category, use the DAVERAGEfunction This function averages the values in a column of a list ordatabase that match specified conditions
DAVERAGE(database, field, criteria)
database: The range of cells in the list or database The first
row of the list contains column headings
field: Indicates the column to use in the function.
criteria: The range of cells containing the specified conditions.
4 To determine the average price of a category:
1 Copy to a worksheet cells A1:C10 as shown in Figure 8-10
2 Copy range A1:C1
3 Select cell A12 and press <Ctrl+V>.
4 In cell B13 enter A to search inside category A.
5 In cell D15 type the following formula:
=DAVERAGE(A1:C10,C1,A12:C13).
6 Press <Enter>.
Figure 8-11