Intro to Excel CSCI-150
Introduction Spreadsheets are applications used mostly to store, organize, calculate, and display numeric data Tabular format: Divided into rows and columns Rows are numbered Columns are labeled with letters Cells hold data (numeric or text), formulas or functions Power: Automatically reapplies formulas as data changes Automatically adapts formulas when copied to new locations
Introduction Each Excel file or project is called a workbook File New Blank Workbook Each workbook contains 1 worksheet by default Each cell in a worksheet may contain Text Numeric Formulas with or w/0 (built-in) Functions
Rows are numbered Columns are assigned letters K6 is highlighted and formula is shown above the sheet – address is shown in upper left corner
Formulas Begin with an = sign May contain Constants Single cell references: D5 Functions: AVERAGE, SUM, etc. … Cell ranges: D5:E7 Connections: +, -, *, /, ^, AND, Or, NOT
Formulas Once written for one cell, can use it for other rows or columns No need to rewrite it Place cursor on the small square in the lower right corner of cell Hold on the small black that appears by clicking on the right mouse Drag to desired cells Notice how formula changes If target cell is not close to cell holding formula Highlight formula cell then Edit Copy Go to target cell then Edit Paste
Formulas Importance of using cell references Relative addressing Formulas can be updated automatically when copied to different cells Formulas can be recalculated when referenced data changes Relative addressing A7 contains formula A5+A6 Copy to B7 ? B7 is one column to the right of A7 Copy to C9 ? C9 is two columns to the right of A7 and 2 rows below it
Formulas Want to refer to fixed position cells? Absolute addressing Place a $ sign before row number row does not change Place a $ sign before column letter column does not change Both cell is fixed New formula
Functions As you enter the = sign The name box changes to a listing of available functions Functions applicable to ranges: SUM, AVERAGE, MAX, MIN, COUNT, COUNTIF
Conditional Functions IF and VLOOKUP function IF-ELSE IF (condition, yes action, no action) Enters one of two possible results in a cell based on condition IF(G5>50000,10%,12%) IF(F5=“F”,”Yes”,”No”) Condition part be any equality or an inequality Compound statements by using AND and OR If worker last name is “Miller” and is full time then they would be eligible for a raise ==F(AND(F4="F",H4=“Miller”),"Yes","No") The book says the opposite Must use DateValue?
VLOOKUP Better if we have more than two options to select from Must have an accompanying lookup table VLOOKUP(x,y,z) x = cell containing value to lookup y = table range (top left and bottom right corners) z = column in table containing the result to write --- 2 Table must be organized in ascending order from smallest to largest One table entry must match the values being looked up Direct match (equal one of the values) Bounds match (table gives lower bounds of ranges) Once the we get the value of the last cell before we cross the boundaries of range of the given value
Multiple Sheets A workbook can have many worksheets Click on the tab for a sheet brings it to the foreground Add new sheets Right on the sheet tab Insert Delete sheets by clicking on their tab Right on the sheet tab Delete Rename sheets Right on the sheet tab Rename (ONE WORD) Rearrange sheets Click on tab, hold down the button, and drag the tab to desired location
Multiple Sheets When a cell referenced in a formula by row and column (e.g. C5) in current worksheet Reference cells in different sheets, add the sheet name followed by ! Make sure sheet name is a valid variable (1 string with no spaces) Sheet2!C5
Cell Naming A frequently used cell can be named so as not to have to refer to it by its address all the time Type in name in Name Box Hit Enter A range of cells can also be named similarly by selecting it and proceeding as above If you select a row or column with a title, the title is suggested by default