You are on page 1of 62

Allowing Only Certain Values in a Cell

This involves creating one or more rules that dictates the type of data or range of values
can enter into a cell. If the user tries to enter something that breaks a rule you can confi
display an error message and reject the entry. This can be done by configuring the DATA
TOOL.

XYZA TRADING
652 University Homes Washington Drive Invoice Number:
Leagzpi City Invoice Date:

Sold To: Ship Tp:

Ship Via:

Quantity Description

Signed

Follow these steps to configure a data validation rule that allow only certain values in a cell:
1) Select the cell to which you want to apply the data validation rule.
2) Choose Data, Data Vlaidation. Excel displays the Data Validation dialog box, shown in Fig
3) In the setting tab, open the Allow list and then select List
4) In the Source box, you have two choices:
* If the list of allowable values exist in a worksheet, specify either the range or a range
that contains the list. (Precede the range or range name with an equal sign.)
* Type the allowable values directly into the Source box, separated by commas, as sho
Figure 2.

Figure 2
Use the Data
Validation dialog
box to set up a data
validation rule that
allows only certain
values in a cell or
range.
box to set up a data
validation rule that
allows only certain
values in a cell or
range.

5) If you want the user to be able to select from the allowable values using a drop-down list
leave the In-Cell dropdown check box activated.

6) To prevent blank entries, click to deactivate the Ignore Blank check box.

7) Click the Input Message tab

8) If you want a pop-up box to display when the user selects the restricted cell or any cell
within the restricted range, leave the Show Input Message When Is Selected check
box activated. Use the Title and Input Message boxes to specify the messagethat display
For example, you can use the message to tell the user that a value for the cell must
be chosen from the drop-down list.

9) Click OK to apply the data validation rule. See Figur 1 as example


type of data or range of values that a user
that breaks a rule you can configure Excel to
e done by configuring the DATA VALIDATION

INVOICE

LBC
Figure 1
When you set up
a list-based
Unit Price validation
Total rule,
Excel displays a
list of the
possible choices
for the cell.

Subtotal:
Tax / Vat:

Total:

only certain values in a cell:


tion rule.
lidation dialog box, shown in Figure 2

cify either the range or a range name


me with an equal sign.)
, separated by commas, as shown
le values using a drop-down list,

ank check box.

the restricted cell or any cell


e When Is Selected check
specify the messagethat displays.
at a value for the cell must

example
GOBOLEO
q1 /15 q2/20
5 8
15

QT/50
4
49

100
LEO
Err:512
LOOKUP FUNCTION
1 VLOOKUP(lookup_value, table_array, col_index_num [range_lookup])
lookup_value This is the value you want to find in the first column of table_arr
you can enter a number, a string, or a reference .
Table_array This is the table to use for the lookup. You can use a range refer
col_index_num If VLOOKUP ( ) finds a match, col_index_num is the column numbe
table that contains the data you want returned (the first column
the lookup column -- is 1, the second column is is 2, and so on)

range_lookup This is the Boolean value that determines how Excel searches fo
lookup_value in the first column.

TRUE --- VLOOKUP ( ) searches for the first exact match for loo
If no exact match is found, the function looks for the largest valu
less that look_value (this is the default).

FALSE --- VLOOKUP ( ) searches only for the first exact match

NOTE:
If range_lookup is TRUE or OMITTED, you must sort the values in the first column in

2 VLOOKUP(lookup_value, table_array, col_index_num)


The range_lookup argument is omitted, which means VLOOKUP ( ) searches for the la
value that is less than or equal to the lookup value; in this case, 20 is the value in ce
which represents the number of ubnits purchased, and the range (I39:J45) is the disc
table. VLOOKUP( ) searches the first column (I38:J45) for the largest value that is les
equal to 20. The first such cell is I41 (because the value in I41 --- 26 --- is greater tha
VLOOKUP ( ) therefore moves to the second column (because we specified col_num t
of the table (cell J41) and grabs the valu there (40%).

Units
Code List Price 40% Net Price TOTAL
Ordered
20 D-178 17.95 40% 359.00 215.40
26 B-047 6.95 42% 180.70 108.42
1000 C-098 19.95 50% 19,950.00 11,970.00
50 B-111 27.95 42% 1,397.50 838.50
5 D-017 17.95 20% 89.75 53.85
25 D-178 9.95 40% 248.75 149.25
100 A-182 6.95 44% 695.00 417.00
250 B-047 2.95 46% 737.50 442.50
131.46429 2.95 46% 387.82 232.69
119.67857 2.95 46% 353.05 211.83

Generating Identification Code in the Worksheet

UPPER(LEFT(A2,5)

LEFT extracts characters from the left of the value in A2


UPPER ( ) function converts themto uppercase
5 refers to the first 5 charaters from the left of the value in A2

beringuela, Rey Belir

Generating Random Numbers in the Worksheet

RAND FUNCTION
For example, random hour values requires numbers between 0 and 23, while random cent values
numbers between 0 and 100. When you need to generate random numbers greater than or equ
and less than n, use the following expression:

1) INT (RAND( ) * n)
INT ( ) Function rounds a number down to the nearest integer
n generate random numbers greater than or equal to 0 and less th

INT(RAND()*24
Application: 1
0
8
12
16
16

Of course, not all integers of random numbers begin at 0. The more general scenario is when you
numbers greater than or equal to some number m and less than some number n. Below is the
expression to use for this case:

2) INT (RAND ( ) * ( n - m) + m)
For example, the following formula produces random test scores greater than or equal to 40 and

INT (RAND ( ) * ( 100 - 40) + 40)


Application: 49 55
40 44
78 41
77 87
60 70
52 85

3) RANDBETWEEN FUNCTION
Excel offers a much easier way to generate random numbers between two values : the RANDBET
which lets you specify a lower bound and an upper bound and then returns a random integer betw

RANDBETWEEN (bottom, top)


bottom the smallest possible random integer. (That is, Excel henerates a random
greater than or equal to bottom)

top the largest possible random integer. (That is, Excel henerates a random n
less than or equal to top)

RANDBETWEEN(0,60) Note:
Application: 45 RAND() and (RANDBETWEEN() are volatile functions, which means
2 you recalculate or reopen the worksheet. To enter a static random n
28 RANDBETWEEN(bottom, top), press F9 to evaluate the function a
45 press Enterb to place the random number into the cell as numeric l
6
15

Extracting a Person's First Name or Last Name


Your worksheet might contain a column with people's full names. If you're preparing the data for
a database or for a mail merge, you might want to extract the first and last name into separate c
Similarly, if you want to sort the data on last name, you would need to extract the last name into

The method for extracting the first names or last names requires two steps. The first step is to lo
space that separates the first and last names. You can do that using the FIND FUNCTION
LEFT(C131,FIND(" ",C131)-1)

Application BANARES Dennis M


BITOON Jordan B.
BRAVO Jovelyn B.
CALLEJA Michael
DAWAL Jobert D.
ILAO Jay Allan
LOZARES Madelyn
MARTINEZ Arvin Clark
column of table_array.

an use a range reference or a name.


s the column number in the
ed (the first column --- that is
n is is 2, and so on).

ow Excel searches for

t exact match for lookup_value.


s for the largest value that is

he first exact match for lookup_value.

in the first column in ascending order

) searches for the largest


20 is the value in cell B36,
(I39:J45) is the discount schedule
gest value that is less than or
- 26 --- is greater than 20).
specified col_num to be 2)

Discount Schedule
Units Discount
0 20%
6 40%
26 42%
51 44%
101 46%
251 48%
501 50%

the value in A2
Jmae Bernabe Jmae
berin

random cent values require


greater than or equal to 0

qual to 0 and less than n.

scenario is when you want


er n. Below is the

or equal to 40 and less than 100


alues : the RANDBETWEEN FUNCTION,
random integer between them

henerates a random number that is

enerates a random number that is

tions, which means that their value changes each time


er a static random number in a cell, type =RAND() or
aluate the function and return a random number, then
he cell as numeric literal

eparing the data for export to


ame into separate columns.
t the last name into its own column.

The first step is to locate the


D FUNCTION
IFERROR(VLOOKUP(lookup_value, table_array, col_index_n
FERROR(VLOOKUP(lookup_value, table_array, col_index_num [range_lookup]))
ABEJURO, Regine ABEJU
ARIVE, Mary Grace Ascano ARIVE
BERINGUELA, Rey Belir BERIN
BUENO, John Edward BUENO
BUNAO, Julie Anne Bilason BUNAO
CARRANZA, Richelle ebuenga CARRA
CARULLO, Sarah Jane CARUL
COLUSO, Erika Cotara COLUS
COLUSO, Erika Cotara COLUS
Calculating the Principal and Interest for a Loan

Any loan payment has two components: principal payment and interest
Interest charges are almost front-loaded, which means that the interest
is highest at the beginning of the loan and gradually decreases with eac
This means, conversely, that the principal component increases gradual
payment. How can you tell what the principal and interest components
given period of a loan? You can use the PPMT ( ) and IPMT ( ) FUNCTION

PPMT ( rate, per, nper, pv [ , fv] [ , type])

IPMT ( rate, per, nper, pv [ , fv] [ , type])

rate The fixed rate of interest over the term of the loan.
per The number of the payment period (where the fisrt pay
the last payment is the same as nper.
nper The number of payments over the term of the loan.
pv The loan principal
fv The future value of the loan(the default is 0.)
type The type of payment. Use 0 (the default) for end-of-pe
use 1 for beginning-of-period payments.
NOTE:
When working with loan and investment formulas, always remember t
out -- such as loan payments and deposit to investments --- are negat
amount you receive --- such as loan principal amount and investment

CAUTION:
To ensure that your loan and investment models return accurate results, be sure
when dealing with the interest and term. For example, if you have an annual in
expressed in years and you want to calculate the monthly principal and interest
interest rate by 12, as shown in figure 3.

LOAN DATA
Interest Rate (Annual) 0.18
Periods(Years) 2.0
Principal 100,000.00
Monthly Payment (4,992.41)

Figure 3
this worksheet uses the PPMT (
) and IPMT( ) functions to
break out the principal and
interest components of a loan
payment

Figure 5 shows a worksheet that applies these functions to a loan. The d


(column E) and interest (Column F) components of the loan for the first
period. Note that with each periuod, the principal portion increases, and

PPMT($B$38/12,D67,$B$39*12,$B$40)
Determining How Much You Can Borrow

If you know the current interest rate that your bank offers for loans, whe
how much you can afford each month for the payments, you might then
is that you can borrow under those terms. To figure this out, you need t
present the value. You do that in Excel by using the PV function:

rate The fixed rate of interest over the term of the loan.
nper The number of payments over the term of the loan.
pmt the periodic payment
fv The future value of the loan(the default is 0.)
type The type of payment. Use 0 (the default) for end-of-pe
use 1 for beginning-of-period payments.

For example, suppose that the current loan rate is 6 percent, you want t
you afford payments of 500 per month. table below shows a worksheet
maximum amount that you can borrow -- 25,862.78 -- using the followin

A
Loan Data
Interest Rate (Annual)
Periodic (Years)
Payment (Monthly)
Maximum Principal

Calculating the Future Value of An Investment

Just as payment is usually the most important value for a loan calculatio
most important value for an investment calculation. After all, purpose o
money (the present value) in an instrument of time, after which you end
greater) amount the future value. To calculate the future value of an inv

rate The fixed rate of interest over the term of the loan.
nper The number of payments in the term of the loan.
pmt The amount deposited in the investment each period (t
pv The loan principal
type The type of payment. Use 0 (the default) for end-of-pe
use 1 for beginning-of-period payments.

Note: Becasue both the amount deposited per period (the


deposit (the pv argument) are sums that you pay out, you m
values in the FV ( ) Function.
Note: Becasue both the amount deposited per period (the
deposit (the pv argument) are sums that you pay out, you m
values in the FV ( ) Function.

In the simplest future value scenario, you invest a lumpsum and let it gr
rate and term, without adding any deposits along the way. In this case,
pmt argument set to 0.
FV (rate, nper, 0 , pv, type)

For example, table below shows the future value of 10,000 invested at 5

A
The Future Value of a Lump Sum
Interest Rate (Annual)
Term (Years)
Deposit per Period
Initial Deposit
Deposit Type
Future Value

Another common investment scenario is to make a series of deposits ov


depositing an initial sum. In this case, you use the FV Function with t
FV (rate, nper, pmy, 0 , type)
For example, table below shows the future value of 100.00 invested eac
that the interest rate and term are both converted to monthly amounts

A
The Future Value of a Series of Deposits
Interest Rate (Annual)
Term (Years)
Deposit per Month
Initial Deposit
Deposit Type
Future Value

For best investments results, you should invest an intial amount and the
this scenario, you need to specify all the FV ( ) function arguments (exce
shows the future value of an investment with a 10,000 initial deposit an
over 10 years.

A
The Future Value of a Lump Sum Plus a Series of Deposits
Interest Rate (Annual)
Term (Years)
Deposit per Month
Initial Deposit
Deposit Type
Future Value

Deciding Whether to Buy or Lease


Another common business trend is whether to purchase equipment outr
decision, you figure the present value of both options and then compare
option being the one that provides the lower present value. (ignore com
depreciation and taxes.)

Assume for now that the purchased equipment has no market value at t
equipment has no residual value at the end of the lease. In this case, th
option is simply the purchase price. For lease option, you determine the
form of the PV ( ) function: =PV(discount, lease term, lease payme

For the discount rate, you plug in a value that represents either a curren
rate. For example , if you could invest the lease payment and get, say,
the function as the rate argument.
For example, suppose that you can either purchase a piece of equipmen
equipment for 240.00 a month over 2 years. Assuming a discount rate
value of the present value of the leasing option? Table below shows a w
5,415.09. This means that purchasing the equipment is the less costly

A
Buying Versus Leasing
Discount Rate
Term (Years)
Lease Payment (Monthly)
Future Value of Equipment
Purchase Price
Present Value of Leasing Option
Present Value of Buying Option

What if the equipment has a future market value (on the purchase side)
side)? This wont make much difference in terms of which option is bette
equipment raises the two present values by about the same amount. H
present value for the purchase option: = purchase price + PV(discou

That is, the present value of the purchase option is the price plus the pre
future market value. (For the lease option, include the residual value as
Table below shows the worksheet with a future value added.
A
Buying Versus Leasing
Discount Rate
Term (Years)
Lease Payment (Monthly)
Future Value of Equipment
Purchase Price
Present Value of Leasing Option
Present Value of Buying Option
for a Loan

principal payment and interest charged.


which means that the interest component
d gradually decreases with each payment.
component increases gradually with each
cipal and interest components are for any
PMT ( ) and IPMT ( ) FUNCTIONS, respectively.

PPMT($B$38/12,D38,$B$39*12,$B$40)

over the term of the loan.


ent period (where the fisrt paymwent is 1 and
ame as nper.
s over the term of the loan.

oan(the default is 0.)


se 0 (the default) for end-of-period payments,
eriod payments.

t formulas, always remember that amounts you pay


it to investments --- are negative values, and
ncipal amount and investment payouts.

els return accurate results, be sure to use consistent units


example, if you have an annual interest rate and a term
the monthly principal and interest, you need divide the

Period Principal Interest


1 (3,492.41) (1,500.00)
2 (3,544.80) (1,447.61)
3 (3,597.97) (1,394.44)
4 (3,651.94) (1,340.47)
5 (3,706.72) (1,285.69)
6 (3,762.32) (1,230.09)
7 (3,818.75) (1,173.66)
8 (3,876.03) (1,116.38)
9 (3,934.17) (1,058.24)
10 (3,993.19) (999.22)
11 (4,053.08) (939.33)
12 (4,113.88) (878.53)
13 (4,175.59) (816.82)
14 (4,238.22) (754.19)
15 (4,301.80) (690.61)
16 (4,366.32) (626.09)
17 (4,431.82) (560.59)
18 (4,498.30) (494.11)
19 (4,565.77) (426.64)
20 (4,634.26) (358.15)
21 (4,703.77) (288.64)
22 (4,774.33) (218.08)
23 (4,845.94) (146.47)
24 (4,918.63) (73.78)
(100,000.00) (19,817.84)
hese functions to a loan. The data table shows the principal
onents of the loan for the first ten periods And for the final
principal portion increases, and the interest portion decreases.

IPMT($B$38/12,D70,$B$39*12,$B$40)
your bank offers for loans, when you want to have the paid off, and
the payments, you might then wonder what the maximum amount
To figure this out, you need to solve for the principal -- that is,
using the PV function:

over the term of the loan.


s over the term of the loan.

oan(the default is 0.)


se 0 (the default) for end-of-period payments,
eriod payments.

n rate is 6 percent, you want the loan paid off in 5 years, and you
able below shows a worksheet that calculates the maximum
25,862.78 -- using the following formula: =PV(B2/12,B3*12,B4)

Note:
B You can use the PV ( ) function to
calculate the maximum principal that
you can borrow, given a fixed interest
0.06
rate, term, and monthly paymnet.
5
(500.00)
25,862.78 =PV(B2/12,B3*12,B4) the formula used

vestment

tant value for a loan calculation, the future value is usually the
alculation. After all, purpose of an investment is to place a sum of
nt of time, after which you end up with a new (and, hopefully,
ulate the future value of an investment, use the FV ( ) Function:

over the term of the loan.


s in the term of the loan.
the investment each period (the default is 0).

se 0 (the default) for end-of-period payments,


eriod payments.

t deposited per period (the pmt argument) and the initila


ms that you pay out, you must enter these as negative
t deposited per period (the pmt argument) and the initila
ms that you pay out, you must enter these as negative

invest a lumpsum and let it grow according to the specified interest


ts along the way. In this case, you use the FV ( ) function with the

ype)

e value of 10,000 invested at 5% over 10 years

B Note:
When calculating the future value of an
initila lump sum deposit, set the FV ( )
0.05 functiuon's pmt argument to 0.
10.00
0.00
(10,000.00)
0.00
16,288.95 =FV(B2,B3,B4,B5,B6) the formula used

o make a series of deposits over the term of the investment, without


u use the FV Function with the pv argument set to 0.
type)
e value of 100.00 invested each month at 5% over 10 years. Notice
onverted to monthly amounts because the deposits occurs monthly.

B Note:
sits When calculating the future
value of a series of
0.05
deposits, set the FV ( )
10.00 function's pv argumnet to
(100.00) 0.
0.00
0.00
15,528.23 =FV(B2/12,B3*12,B4,B5,B6) the formula used

nvest an intial amount and then add to it with regular deposits. In


V ( ) function arguments (except type). For example, table below
with a 10,000 initial deposit and 100 in montly deposits at 5%

Note:
B
The table uses the full FV ( )
a Series of Deposits function syntax to calculate the
0.05 value of a lumpsum plus a
10.00 series of deposits.
(100.00)
(10,000.00)
0.00
31,998.32 =FV(B2/12,B3*12,B4,B5,B6) the formula used

er to purchase equipment outright or to lease it. To make such a


oth options and then compare the results, with the preferable
wer present value. (ignore complicating factors such as

ment has no market value at the end of the term and that the leased
nd of the lease. In this case, the present value of the purchase
ease option, you determine the present value using the following
nt, lease term, lease payment)

that represents either a current investment rate or a current loan


e lease payment and get, say, 6% per year, you would plug 6% into
purchase a piece of equipment for 5,000.00 now or lease the
rs. Assuming a discount rate of 6% percent, what is the present
option? Table below shows a worksheet that calculates the answer:
e equipment is the less costly choice.

B Note:
Using the PV ( )
0.06 Function to compare
2.00 buying versus leasing
(240.00) equipment
0.00
5,000.00
5,415.09 =PV(B2/12,B3*12,B4,B5) the formula used
5,000.00

t value (on the purchase side) or a residual value (on the lease
terms of which option is better because the future value of the
by about the same amount. However, note how you calculate the
purchase price + PV(discount rate, term, 0, future value)

option is the price plus the present value of the equipment's


n, include the residual value as the PV ( ) function's fv argument.)
uture value added.
B Note:
Using the PV ( ) function to
0.06 compare buying versus
leasing equipment that has
2.00 a future market or residual
(240.00) value.
(1,000.00)
5,000.00
6,302.27
5,887.19 =B5+PV(B2/12,B3*12,0,B4) the formula use
$40)

Total
(4,992.41)
(4,992.41)
(4,992.41)
(4,992.41)
(4,992.41)
(4,992.41)
(4,992.41)
(4,992.41)
(4,992.41)
(4,992.41)
(4,992.41)
(4,992.41)
(4,992.41)
(4,992.41)
(4,992.41)
(4,992.41)
(4,992.41)
(4,992.41)
(4,992.41)
(4,992.41)
(4,992.41)
(4,992.41)
(4,992.41)
(4,992.41)
(119,817.84)

ases.
id off, and
m amount
hat is,

and you

B3*12,B4)

at
st

sed

ly the
a sum of
ully,
unction:

e initila
ative
e initila
ative

ed interest
on with the

of an
()

formula used

ent, without
ars. Notice
rs monthly.

the formula used

posits. In
ble below
t 5%

)
e the

the formula used

e such a
rable

t the leased
chase
ollowing

ent loan
ug 6% into
e the
present
e answer:

the formula used

lease
of the
ulate the
value)

ument.)

) the formula used


Number 5 B

Loan Data

Interest Rate (Annual) 0.10

Periodic (Years) 2.00

Payment (Monthly) (300.00)

Maximum Principal 6,501.26


Number 4 B

The Future Value of a Lump Sum

Interest Rate (Annual) 0.03

Term (Years) 5.00

Deposit per Period 0.00

Initial Deposit (100,000.00)

Deposit Type 0.00

Future Value 115,927.41


Number 3 B

The Future Value of a Series of Deposits

Interest Rate (Annual) 0.06

Term (Years) 2.50

Deposit per Month (500.00)

Initial Deposit 0.00

Deposit Type 0.00

Future Value 16,140.01

Number 2

The Future Value of a Lump Sum Plus a Series of Deposits

Interest Rate (Annual) 0.05

Term (Years) 5.00

Deposit per Month (1,000.00)

Initial Deposit (20,000.00)

Deposit Type 0.00

Future Value 93,673.26


Number 1a

Buying Versus Leasing

Discount Rate 0.10

Term (Years) 3.00

Lease Payment (Monthly) (560.00)

Future Value of Equipment 0.00

Purchase Price 25,000.00

Present Value of Leasing Option 17,355.09

Present Value of Buying Option 25,000.00

Number 1b

Buying Versus Leasing

Discount Rate 0.10

Term (Years) 3.00

Lease Payment (Monthly) (560.00)

Future Value of Equipment (800.00)

Purchase Price 25,000.00

Present Value of Leasing Option 17,948.48

Present Value of Buying Option 25,593.39


2 6 8
2 6 8
2 6 8

15 10 4 15 10 34
4 12 8 5 3 32
5 2 4 13 11 30
1 FILL HANDLE 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 10
11 11
12 12
13 13
14 14
15 15
16 16
17 17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FILL HANDLE
1 1 2
123456 3 2 4
5 3 6
7 4 8
76,900.00 9 5 10
11 6 12
13 7 14
15 8 16
17 9 18
19 10 20
21
23
25
27
29
31
33
35
37
39
Units Ordered Code List Price 40% Net Price TOTAL

20 D-178 17.95 359.00 359.00


26 B-047 6.95 180.70 180.70
1000 C-098 19.95 19,950.00 19,950.00
50 B-111 27.95 1,397.50 1,397.50
5 D-017 17.95 89.75 89.75
25 D-178 9.95 248.75 248.75
100 A-182 6.95 695.00 695.00
250 B-047 2.95 737.50 737.50
131.4642857 2.95 387.82 387.82
119.6785714 2.95 353.05 353.05
Discount Schedule

Units Discount
0 20%
6 40%
26 42%
51 44%
101 46%
251 48%
501 50%
16
5
20
22
11
19
3
7

You might also like