160 likes | 262 Views
Keith A. Woodbury Mechanical Engineering University of Alabama. Excel in M.E. – part i. Using cell references can be difficult when working with formulas and spreadsheets References like “A1” and “G47” don’t mean much
E N D
Keith A. WoodburyMechanical EngineeringUniversity of Alabama Excel in M.E. – part i
Using cell references can be difficult when working with formulas and spreadsheets • References like “A1” and “G47” don’t mean much • By naming the cell it becomes easier to identify a parameter in a formula or function call • Assigning natural names to parameters makes it easier to find mistakes Naming Variables
Naming Variables - Example Not a good way to code formulas. Although ‘F2’ reveals which cells are involved in the computation, a look at the formula does not immediately reveal what variables are involved.
Named Ranges Instead, use names for the variables Choose names that are longer than two characters so Excel doesn’t confuse them with cell addresses Choose “P_1” instead of “P1” Or “Press” instead of “P”
Naming Variables - Example Create “named cells” to use in formulas This is on the “Formulas” ribbon in Excel 2007 Highlight cells with names and values in adjacent cells
Named Range - Example Named Cells can also be ranges (vectors); in this case the named cells are in columns or rows
Named Range - Example Now the formula is readily human-readable Excel uses the entry in the vector on the same row as the formula
It is easier when working with formulas in Excel to document them. • Formulas are shown next to computed result • Mistakes can be spotted quickly • Documentation should also make printed copies of the file understandable to knowledgeable person (teacher or colleague) • This process involves copying formulas into cells or using Excel’s Tools tab. Documenting Spreadsheets
Suggested Convention… Use the first column for labels for the values Use the second column for the given value or formula to compute the result Put the units of the quantity in the third column Use the fourth column to cut-and-paste the text of the formula, or to provide additional explanatory information
Documenting SS - Example First use ‘F2’ to highlight show the formula for the cell
Then use “CTRL+c” to cut the text to the clipboard buffer, followed by “ESC” to get out of “F2” mode
Now move over to the fourth colum, put a leading tick-mark (‘) so Excel will treat as text (not formula), then use “CTRL-v” to paste the clipboard contents
Highlight formula cell “F2” to get equation displayed “SHIFT-HOME” to highlight “CTRL-c” to copy “ESC” to get out of “F2” mode Move to fourth column Tick mark to treat paste as text “CTRL-v” to paste the formula Secret Jedi Keystroke sequence