


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This is called relative addressing. To keep a formula from changing when copied, use absolute addressing. Example. Suppose in cell B3 you put the formula =B2+ ...
Typology: Study notes
1 / 4
This page cannot be seen from the preview
Don't miss anything!



Math 132-015 & 022 Fall 2002
Go through this handout if you are not familiar with spreadsheets and relative addressing. The details below refer to Excel 2000, but any version of Excel will be sufficient for the homework. The command-line features work the same on all versions (and on most other spreadsheet programs), but some of the menus and graphical shortcut features may be different. Click Help for information on the version you are using.
Warning: Excel, like all programs, can crash unpredictably, losing all your unsaved work. Save frequently onto your own floppy disk.
A spreadsheet is simply a rectangular array on the screen, consisting of boxes called cells. A cell is labelled by its column (lettered A, B, C,... ) and its row (numbered 1, 2, 3,... ). Thus, cell C19 is in the third (C) column and the 19th row. You may type small letters in referring to columns: the program will know that e9 means the cell E9. A cell can contain three types of data: a string of text; a number; or a formula. In spreadsheets, as in algebra, formulas compute a number by performing operations (like addition) on other numbers (the contents of other cells). The cell then displays the resulting number, rather than the formula itself.
To put information in a cell, first select that cell. That is, click on it with the mouse, or use the arrow keys to move the selected cell to the one you want. The currently selected cell will have a dark frame around it. To enter text or numbers, simply type what you want, and press Enter (line-return). What you type is displayed in the cell and in the formula bar at the top of the screen. You can also type into the formula bar by clicking on it, instead of into the cell itself. To enter a formula, you first type an equals sign =, followed by an algebraic expression referring to other cells. For example, if you want cell B3 to display the sum of the numbers in cells B2 and C3, select B3 and enter =B2+C3. (If you have not yet entered any numbers into B2 and C3, they count as zero.) A formula will react to any changes you make in the other cells. Thus, if you change the numbers in B2 and C3, the cell B3 will change to display the sum of the new values. This makes it easy to do “what if” simulations of different
situations.
Examples
multiply B6 and C7 =B6C you must use an asterisk * to multiply wrong: =B6C7 or =B6 C add all the cells between A1 and A15 =sum(A1:A15) cosine of D2 =cos(D2) parentheses are essential wrong: =cos D one half times the square of A3 =1/2A3^2 or =.5A3^ square of half of A3 =(1/2A3)^
Copying is done as in other windows programs: click on the cell you want to copy from, click on the Edit menu at the top of the screen, move down to Copy, and click. Next click on the cell you want to copy to, click on the Edit menu, move down to Paste, and click. (Shortcut: instead of the menus, click
Example. Suppose in cell B3 you put the formula =B2+A1. In performing the addition, the program thinks of the other cells relative to the current cell: that is, B2 is ‘the cell one row up from the current cell (B3)’, and A1 is ‘the cell two rows up and one column left from the current cell (B3)’. Now copy-and-paste from B3 to B4. You will find that your formula has changed in B4 to =B3+A2! This is because when you are at B4, cell B3 is ‘the cell one row up from the current cell (B4)’, and A2 is ‘the cell two rows up and one column left from the current cell (B4)’. If you copy B3 to D4, the formula in D4 will be =D3+C2. If you want to keep an address unchanged when copied, use absolute ad- dressing, indicated by $ signs before the row and column of the address. Thus, if B3 contains the formula =$B$2+A1, and this is copied to D4, it becomes =$B$2+C2 : that is, the absolute address $B$2 did not change, but the relative address A1 did change. The $ sign does not affect the value of the formula within its cell: it only affects the way the formula is copied to other cells. You can also make the column-part of an address absolute and the row-part relative, or vice-versa. Thus, if =$B2+A1 is copied from B3 to D4, it becomes =$B3+C2. If =B$2+A1 is copied from B3 to D4, it becomes =D$2+C2.
Save As. Excel can crash or freeze at any time for no reason, losing all work which is not saved to a file. Save onto your own floppy disk (which you should back up periodically), or to a file on the computer you are at, transferring it to your own account at the end.
Exercise. (Not to hand in.) Use Fill Down and Fill Right to efficiently create the array:
Save your work when finished.
Example. Here is how to make a column of evenly-spaced numbers whose spacing is easy to change. First, put the spacing increment into a cell: say, into B1 put the number 0.5. Then start the column of numbers: into B3, for example, put 1.5. Underneath, into B4, put the formula =B3+$B$1. Here B is a relative address, $B$1 an absolute address. Now select the block B4:B (that is, the range between these two cells, inclusive) and Fill Down. You should get the same column of numbers as in a previous exercise: 0.5, 1.0, 1.5.... So B5 should contain =B4+$B$1, etc. Now if you change the value of B1 to 0.2, the column immediately changes to 1.5, 1.7, 1.9, etc. As an experiment, repeat the above exercise without $ signs in the formula in B4. Click to see what formulas got copied into the column. Now try filling down from =B3+B$1 in B4. Can you understand what happened? Absolute addressing is necessary when referring to a quantity (like the increment) which stays constant throughout a computation, but which you might want to change later. Another convenient way to refer to such a constant is naming a cell. In A1, type an alphabetic name for the value in the adjacent cell B1 (call it ‘dt’, for example), followed by =. That is, in A1 enter dt=. Now select B1, and in the Insert menu choose Name > Define. (In older versions, this is in the Formula menu, under Define > Name.) In the dialog box, Excel will suggest the name dt which you entered. Click OK. (If Excel suggests the wrong name or cell, enter the correct information in the boxes.) Now in your formulas you can write dt instead of $B$1, and get the same list. Formulas are more un- derstandable with named constants instead of fussy absolute addresses. Save your work.