Using Excel
Excel is a program that is useful for mathematical operations, especially the
kind that involve working with tables of numbers.
It is available on almost any computer running Windows.
Excel is started in one of several ways:
- There may be an icon on your screen (it is a bluish X).
- You may have to look for it by clicking on "Start" and then "Programs"
- If you locate an Excel file on your hard disk, a floppy, or a CD-ROM, you can
open the file and start Excel at once by clicking on the file name. (You will know
it is an Excel file because there is an icon with a blue X on it. Excel files
also have file names that end in ".xls").
- If you encounter a reference to an Excel file in a web document, you
can open it and start Excel by clicking on it, just like other links --
if you are using Internet Explorer. Netscape will not open Excel files
automatically (indeed, it may not be a good idea to open Excel files
without first thinking about where it came from, because there once
was
a sort of virus transmitted this way).
The Excel worksheet is a giant table, with rows labelled by numbers
and columns labelled by letters. The elements of the table are called
cells. Cells then have names, like A1 (the first cell on the
first row) or C11 or W53 (which is not visible on the screen when
Excel first starts -- you have to go look for it).
A cell may contain any kind of data or text, or a formula telling
Excel how to compute what is displayed in the cell using data to be
found in other cells. For example, we could fill in the cells as follows:
| A | B | C | D |
1 | | Grocery Bill |
| |
2 | Item | Number | Price per
item | Cost |
3 | Apples | 7 | $0.35 | =B3*C3 |
4 | Canned Peas | 3 | $0.85 | =B4*C4 |
5 | Bars of Soap | 4 | $1.10 | =B5*C5 |
6 | Watermelon | 1 | $3.50 | =B6*C6 |
7 | Total | =SUM(B3:B6) | | =SUM(D3:D6) |
tr>
8 | Average cost per item | | |
=D7/B7 |
What you would see, however, would be the results of the multiplication
(to find the cost), column sums (to find the number of items and total cost),
and division (to determine the average cost per item). Once the table is
set up, you can decrease the number of apples and change the price of
a bar of soap and the calculations will be redone immediately.
(This example is the file xlexampl.xls.
You could go play with it for a minute, now). You surely can
find uses for a program like this, in calculating student grades,
figuring your taxes, or keeping track of the current value of your
collection of catsup bottle labels.
Across the top row of the Excel display screen are a set of pull-down
menus, labelled X, File, Edit, View, Insert, Format, Tools, Data, ... .
The most useful subcommands are:
- X has a subcommand "Restore" which will give you back the file
you started with -- if you got totally mixed up, or were only playing
and want to start over.
- File has the subcommands New, Open, Close, Save, Save As ... , and Print, which
have the same meanings as in Word and other Windows programs. At the bottom
of the column you will see files you have opened recently.
- Edit has the very useful subcommand Undo, which will get you out of
messes sometimes. After you have selected a rectangular set of cells
(by clicking
the mouse in one corner, holding down the ear, and dragging to the other
corner), Cut and Copy will make a copy on "the clipboard." The subcommand
Delete does not copy to the clipboard. The information on the clipboard
can then be put somewhere else using the subcommand Paste. (However,
please see the discussion of relative and absolute references, below).
- The subcommands under View affect how the table is displayed.
- To insert a new row or column, select a row or column by clicking
on the border (where the letters and numbers are), and then use the
subcommands under Insert. The new row appears just above the selected
row, and the new column appears to the left of the selected column.
- To use the subcommands under Format, you should select a row, column,
or cell; then the corresponding subcommand will let you change alignment,
number of decimal places displayed, as well as things like font and color.
- Under Data there is a useful subcommand Sort. To use it, select the
part of the table you wish to sort -- for example, in the Grocery Bill
example, click on Apples and drag to the cell D6 (the cost of the
watermelon). We would not wish to do a rearrangement of the table
including the header lines, and we want to keep the items and their
prices together (you should try sorting after selecting other parts of the
table. You will find the "Restore" command useful). Now click on
Data -- Sort and a dialog box appears, in which you can specify
whether to sort by the column labelled Item (giving a grocery bill in
alphabetic order) or by another column (giving a grocery bill that
puts the expensive items at the end, or that ends with the items
that made the biggest contribution to the grocery bill).
There are two different ways to refer to a cell that needs to be
explained here.
- Suppose cell C5 contains the very simple formula
"=B3 + 1." Cell B3 is two rows higher and one column over from cell
C5. If this formula is copied from the clipboard using the
Select-Paste route
(described above) into cell F11, what will appear there is "=E9+1" because
cell E9 is two rows higher and one column over from cell F11. This
is very useful, if your intention is to add each number in column
B to the corresponding number in column C and put the result in column
F: you need only to put "=B1+C1" into cell F1, and then copy the
cell into the remaining cells in column F (F2 through 47, perhaps),
which can be done with just a few
clicks (select all the cells from F2 to F47 by one dragging motion,
and then Paste!).
- But perhaps your intention is to add the current price of a
first class stamp to every order. We put the stamp price into cell
K1, for example, and then write a formula "=B1 + $K$1" in cell C1.
When this is copied into cell C5, it becomes "=B5 + $K$1" -- the
first number is a relative reference to another number on the
same row, while the $K$1 always means the price of a stamp. Now
you only have to change one entry in your worksheet when the
postal rates go up, and everything else will change automatically.