Icolumns C
to
MI
18
CHAPTER
5
THE
EXAMPLES
CASH
FLOW
MODELLING
The
following sections
illustrate
the use
of
Abacus
by
developing a number
of
examples.
In
addition
to
explaining the
way
a number
of
features work, the examples have been
chosen
to
show some
of
Abacus's wide range
of
applications.
The
best
way
to
learn
about Abacus
is
to
use
it
The
examples have been written
with
this
in
mind.
You
are
recommended
to
work through
all
the examples yourself, typing them
In
as
you
go along.
Each
contains some additional information,
as
well
as
giving more pracllce
with
the topics covered
In
earlier
examples.
You
may
well
be
able
to
think
of
modifications
and Improvements and they should give
you
ideas about how
to
construct applications
of
your
own.
In
all
the examples
In
this
chapter,
text,
numbers and formulae
are
shown exactly as
you would type them
In.
If
a
cell
range
IS
required,
it
will
be given
In
brackets
at
the
end
of
the
line.
In
many cases the range
you
need
will
be the one that Abacus suggests
and
you
can select
it
simply
by
pressing ENTER.
In
other cases
you
will
have
to
type
In
the range
yourself.
If
the cursor needs
to
be positioned
on
a particular
cell,
its
cell
reference
is
shown
In
square brackets
at
the beginning
of
the line - do
nor
type
in
any such cell
reference.
For
example, the
line:
IMj
ro.,=month(colO-ll
IcolumnsBtoMj
should be read
as:
move the cursor
to
cell
A4,
and then type
In
ro.,=month(col()-1)
If
necessary, modifying the range suggested
by
ABACUS
to
be
from
column B
to
column
M.
Where
you
have
to
type
in
an
explicit range
reterence,
e.g.
b3:e15,
It
will
be given
In
that
form.
When commands
are
given
in
full
they
are
shown exactly as they
will
appear on the
screen. Remember
that
you
only need
to
type
in
the
first
letter
of
each option - the
rest
is
filled
in
by Abacus.
If
you want
to
use the default option
you
should
Just
press ENTER.
Each example assumes that
you
start
with
a completely blank grid.
If
necessary clear
the
grid
with
the Zap command before starting
to
type
In
the example.
This
is
a more complete version
of
the simple cash flow example of Chapter
4.
When
you
have finished the grid
it
should look
like
Figure
51.
The
first
two cell entries produce
an
underlined
title
for the grid.
[C1]
"CASH
FLOW
[C2]
reptC"=",len(c1)
The second entry uses the rept( ) function which needs two arguments. The
first
is
text,
or a reference
to
a
cell
which
shows
a
text
value
and the second
is
numeric. The function
produces that number
of
repetitions
of
the
first
character
of
the text
In
thiS
case
It
underlines the
1I1Ie
with
'='
signs,
to
the exact length
of
the
title.
If
you decide
to
change
the title there
IS
no
need
to
alter the formula
in
cell
C2
since
it
uses the len( ) funclion
to
read the length
of
the
text
in
cell
C1.
[M]
row=month(col
()-1)
[columns B
to
MI
[ASI
ro.,=rept("-",width()+1)
[columns A
to
Mj
These
row
entries produce month headings, and
rule
a line across the whole
of
the
used part of the grid.
The
function width( ) gives the width,
in
character spaces,
of
each
column.
It
can therefore
be
used
to
rule
lines across a grid
With
columns
of
different
widths. There
is
one extra character space separating each column
of
the grid, which
IS
why the additional
+1
is
needed.
[A6]
"SALES
[B61
4000
[C61
rO"=50
1. j on*1
.02
12/84