Top Banner
Computer Science 1000 Spreadsheets III Permission to redistribute these slides is strictly prohibited without permission
26

Computer Science 1000 Spreadsheets III Permission to redistribute these slides is strictly prohibited without permission.

Jan 04, 2016

Download

Documents

Derick Matthews
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Computer Science 1000 Spreadsheets III Permission to redistribute these slides is strictly prohibited without permission.

Computer Science 1000

Spreadsheets III

Permission to redistribute these slides is strictly prohibited without permission

Page 2: Computer Science 1000 Spreadsheets III Permission to redistribute these slides is strictly prohibited without permission.

Referencesup until now, all values in cells depended

only on the information in their formulas in other words, cell B6 was only affected by the

data/formula entered into B6 this results in a few inefficiencies:

data has to be repeatedupdating information in one cell requires

manually updating all related cells

Page 3: Computer Science 1000 Spreadsheets III Permission to redistribute these slides is strictly prohibited without permission.

Consider our previous example:

Note that all prices had to be repeated in this cell. Furthermore, if the price of socks changes, we have to update 4 different cells.

Page 4: Computer Science 1000 Spreadsheets III Permission to redistribute these slides is strictly prohibited without permission.

Referencesa formula that refers to the information in

another cell/rangewhen the name of a cell or range is used as a

formula (or in a formula), that name is replaced with its stored values

as a result:data doesn’t have to be copiedcells automatically update themselves when

referred cell values change

Page 5: Computer Science 1000 Spreadsheets III Permission to redistribute these slides is strictly prohibited without permission.

Simple Cell Reference the simplest formula for a cell reference is the label of a cell

remember: a cell label consists of its column, then row

Page 6: Computer Science 1000 Spreadsheets III Permission to redistribute these slides is strictly prohibited without permission.

Cell Reference this simple notion of cell references is very powerful consider our previously mentioned inefficiencies

Note that to use the value 3 from the previous cell, we did not have to repeat that value in B1.

Page 7: Computer Science 1000 Spreadsheets III Permission to redistribute these slides is strictly prohibited without permission.

Cell Reference this simple notion of cell references is very powerful consider our previously mentioned inefficiencies

Note that anytime we change A1, all cells that reference A1 automatically update.

Page 8: Computer Science 1000 Spreadsheets III Permission to redistribute these slides is strictly prohibited without permission.

Cell Reference – Automatic Updatingnote that the automatic updating feature

cascadeswhen B1 automatically updates, any cells

referencing B1 will update as well

Page 9: Computer Science 1000 Spreadsheets III Permission to redistribute these slides is strictly prohibited without permission.

References as with numbers and text, cell references are

typically not used as a standalone formula rather, they are used as part of another formula recall the max function shown earlier

Page 10: Computer Science 1000 Spreadsheets III Permission to redistribute these slides is strictly prohibited without permission.

Back to Previous Exampleupdate example to make use of references

Page 11: Computer Science 1000 Spreadsheets III Permission to redistribute these slides is strictly prohibited without permission.

Back to Previous Exampleupdate example to make use of references

Page 12: Computer Science 1000 Spreadsheets III Permission to redistribute these slides is strictly prohibited without permission.

Back to Previous Exampleupdate to make use of references

Page 13: Computer Science 1000 Spreadsheets III Permission to redistribute these slides is strictly prohibited without permission.

Cell References previous example shows how powerful references

can be however, there is still a matter of user efficiency

What would happen if there were 150 items purchased in the transaction?

Page 14: Computer Science 1000 Spreadsheets III Permission to redistribute these slides is strictly prohibited without permission.

Range References recall that a range is a reference to multiple cells many Excel functions allow a user to pass a range

in place of multiple parameters e.g. the max function:

Page 15: Computer Science 1000 Spreadsheets III Permission to redistribute these slides is strictly prohibited without permission.

Cell References there is a function called sum, that works like max, but returns

the sum of its input values, rather than the largest one use sum to compute Subtotal

Page 16: Computer Science 1000 Spreadsheets III Permission to redistribute these slides is strictly prohibited without permission.

Cell References let’s extend our receipt example to allow a quantity to be

attached to each item we’ll rename Price to Cost

Page 17: Computer Science 1000 Spreadsheets III Permission to redistribute these slides is strictly prohibited without permission.

Cell References first, we’ll insert a couple of columns (Quantity, Price)

the formulae should stay under the Price heading

Page 18: Computer Science 1000 Spreadsheets III Permission to redistribute these slides is strictly prohibited without permission.

Cell References the quantity column will be updated by the user, depending on

how many items they buy

Page 19: Computer Science 1000 Spreadsheets III Permission to redistribute these slides is strictly prohibited without permission.

Cell References the Price column will be calculated from the Quantity and

Cost

Page 20: Computer Science 1000 Spreadsheets III Permission to redistribute these slides is strictly prohibited without permission.

Cell References this formula should be repeated for each item

Page 21: Computer Science 1000 Spreadsheets III Permission to redistribute these slides is strictly prohibited without permission.

Copy and Fill the previous example works, but we see a

similar user efficiency issue as before

What would happen if there were 150 lines of items purchased in the transaction?

Page 22: Computer Science 1000 Spreadsheets III Permission to redistribute these slides is strictly prohibited without permission.

Copy and Fill fortunately, Excel (and others) allow two convenient

methods to easily repeat a formula in multiple cells Copy

Select the cell that you want to copy the formula from Indicate Copy (e.g. Ctrl+C)

cell will indicate that it’s about to be copied via an animated highlight

Select the cell(s) that you want to paste to can be a single cell, or a range

Indicate Paste (e.g. Ctrl+V)

Page 23: Computer Science 1000 Spreadsheets III Permission to redistribute these slides is strictly prohibited without permission.

Ctrl+C

Select New Range

Ctrl+V

Page 24: Computer Science 1000 Spreadsheets III Permission to redistribute these slides is strictly prohibited without permission.

Copy and Fill

Notice that the Excel modified each formula appropriately, to match the cell. This is due to relative references (explained later).

Page 25: Computer Science 1000 Spreadsheets III Permission to redistribute these slides is strictly prohibited without permission.

Copy and Fill Fill

similar to copy, but doesn’t require clipboard

Method: Select the cell that you want to copy the formula from Grab the Fill Handle on bottom right corner Drag around cells that you wish to copy into

Page 26: Computer Science 1000 Spreadsheets III Permission to redistribute these slides is strictly prohibited without permission.

Handle

Drag

Release