ECE 102 Engineering Computation Phillip Wong Spreadsheets Introduction to Microsoft Excel
Spreadsheets A spreadsheet stores data in a 2D grid of cells. Cell may contain: numeric value or text formula (possibly dependent on other cells) Changing a cell automatically updates all cells that are dependent on the changed cell. Spreadsheets are used for: Processing and analyzing data (tables, graphs) Performing What if? scenarios 1
Historical look at spreadsheets: VisiCorp Visicalc (1979, Apple II) Lotus 1-2-3 (1983, IBM PC) Microsoft Excel 2.0 (1987, IBM PC) 2
Introduction to Microsoft Excel (2007 version) Microsoft Excel is a popular spreadsheet program used in both business and engineering. Excel Terminology Worksheet - The current work area is called a worksheet, which is arranged as a grid of rows and columns. (Max cols: 16K Max rows: 1M) Workbook - A workbook consists of one or more worksheets. Each worksheet is accessed by a tab. 3
Row Index A numeric value that identifies a row. Column Index A letter or combination of letters that identifies a column. Active Cell The current highlighted cell in the spreadsheet. The contents of the active cell can be modified by entering a data value or a formula. Office Button Displays a menu for saving and loading files and for printing a spreadsheet. Ribbon Shows the available commands and operations of the selected category. Function Bar Allows entry / editing of a cell. 4
Office Button Quick Save Undo / Redo Ribbon Help Active Cell Name Box Formula Bar Column Index Row Index Vertical Scrollbar Worksheet Tabs Horizontal Scrollbar View Control Zoom Control 5
Ribbons & Menus Home Insert Page Layout Formulas 6
Data Review View Right-clicking on a cell or object on the worksheet causes a context-sensitive menu to pop-up. The pop-up menu contains common operations that are appropriate for the selected cell or object. 7
Cell Address Each cell has a unique address. Address column index followed row index Column: Letter (e.g., A-Z, AA-ZZ, AAA-XFD) Row: Number (e.g., 1 thru 1048576) Example: A1 Column A, Row 1 B12 Column B, Row 12 AA6 Column AA, Row 6 BT541 Column BT, Row 541 8
Specify a range of cells like this: StartAddress:EndAddress Example: A2:A4 Column A2 A3 A4 B3:E3 Row B3 C3 D3 E3 C1:E3 Block C1 C2 C3 D1 D2 D3 E1 E2 E3 9
Select the active cell by using the mouse or the arrow keys. Click and drag the lower right corner of a cell to copy the contents of the cell across rows or columns. Cell addresses are relative by default and will automatically update across rows and columns. A cell can be addressed absolutely by using the $ symbol. Absolute addresses do not update. Example: A$1 $A1 $A$1 Relative Absolute Absolute Relative Absolute Absolute 10
Cell Value A cell can contain: Numeric constants: 123 5.412-3.2e11 Text constants: Hello Velocity x Formulas: 5+3.2 F2 SIN(A3) 2*SUM(B1:B5) For constants, type the value into the cell. For formulas, type an equal sign = before entering the formula into the cell. Formulas can contain references to other cells. 11
Example: Show Formulas OFF Show Formulas ON f(x) = a 0 + a 1 x + a 2 x 2 g(z) = sin(z), z = 0 to 2π step π/2 To toggle Show Formulas, type: Ctrl ~ (Control-tilde) 12
Charts (Graphs) Excel has extensive data charting capabilities. Chart types include: Column Area Doughnut Line X Y (Scatter) Bubble Pie Stock Radar Bar Surface Most attributes of the chart can be edited, including axes type, scaling, labels, title, line/point/marker types, sizes, colors, fonts, etc. Charts can also have embedded text boxes. 13
14
15
16
17
By right-clicking on a data trace, you can manually edit the parameters of the data source. Select Edit to view or modify the range of a data series. 18
Importing Data Data from an external source can be imported into the worksheet. Often, the data is stored in a text file as rows and columns of numeric values. Columns are either fixed-width or separated by a delimiter (e.g., tab, comma, or space) Example: x f(x) g(x) x,f(x),g(x) Fixed-width 0.0 0.0 0.0 0.0,0.0,0.0 0.1 1.0 2.12 0.1,1.0,2.12 Delimited 0.2 2.33-5.11 0.2,2.33,-5.11 19
Choose the From Text option on the Data ribbon. Within the dialog box, select the name of the text file you wish to import. 20
21
The data values in the text file are imported into the worksheet. 22
23