Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Science 1000 Spreadsheets V Permission to redistribute or use these slides is strictly prohibited without permission.

Similar presentations


Presentation on theme: "Computer Science 1000 Spreadsheets V Permission to redistribute or use these slides is strictly prohibited without permission."— Presentation transcript:

1 Computer Science 1000 Spreadsheets V Permission to redistribute or use these slides is strictly prohibited without permission

2 Named Cell/Range up until now: cells were identified by Column-Row label ranges were identified by top-left to bottom-right cells sometimes, this is not intuitive for example, the tax rate from our example was stored in H1 we have to remember that location easy on a small page, but imagine a page that is full of information

3 Named Cell/Range Excel offers the ability to apply a meaningful name to a cell or range this name can be used in place of the cell’s typical label procedure: select the cell or range you wish to name type the name into the Name box – left of the formula bar

4 Named Range notice that renaming this cell does not affect the current formulas in other words, the standard cell labels still apply

5 Named Range we can use the new label in place of the old cell label functions like an absolute reference

6 Named Range to remove a name from a cell or range select the Name Manager on the Formulas ribbon select the name you wish to remove, and click Delete

7 Hiding Cells the example is looking good, with one exception the tax rate looks a little out of place it would be nice if it was usable, but not visible

8 Hiding Cells fortunately, Excel easily allows us to hide rows and columns procedure: select the rows or columns that you wish to hide by clicking on their label right click, and select Hide Notice that Column G and H have disappeared. But the tax rate is still being applied.

9 Hiding Cells to make a row or column visible again select the rows/columns on either side right click, and select Unhide And they’re back!

10 Cross-sheet References hidden cells work really nicely for computed cells for cells that you have to change often, hidden cells can be a pain every time you need to make a change, you have to unhide, and then remember to hide again when you are complete in these circumstances, it’s probably better to move unneeded information to a new sheet

11 Cross-sheet References most spreadsheets are stored as a workbook each workbook has multiple worksheets, or sheets each sheet represents the grid that you’ve seen so far, but there are others you can see the others by clicking on the tabs at the bottom of your workbook you can also add a new sheet by clicking on the rightmost tab

12 Click here for new sheet.

13 Cross-sheet References a formula in one sheet can reference a cell or range from another sheet to do this, simply prepend the name of the reference with: the name of the sheet (found on the tab) the ! operator (often called the bang operator) example: redo our previous example, but put the tax information on Sheet4

14 Step 1: Put the tax information on the new sheet

15 Step 2: Change the reference in the top formula if your sheet name contains spaces, put it in single quotes

16 Step 3: Fill the other cells same absolute/relative rules apply, so be careful!

17 Step 4: Delete the other tax information not needed any longer

18 Sheet Names thus far, our sheets have used their default names Sheet1, Sheet2, Sheet3 this is ok, but like row/column labels, can be unintuitive instead of accepting default sheet names, you can rename each sheet to something more meaningful procedure: double click on sheet tab type in the new name of the sheet e.g. in our previous example, rename the sheet storing the tax information to TaxInfo

19 Double Click Type “TaxInfo” Press Enter

20 Sheet Names when referencing, we can substitute the default sheet name with the new sheet name

21 Sheet Names rules must be 31 or fewer characters cannot contain [ ] * ? / \ quick note if your sheet name contains a space, put it in single quotes when referencing

22 Cross-sheet References and Named Cells note that a named cell refers to a specific row/column in a particular sheet therefore, by naming a cell in a sheet, that cell can be accessed by name in any other sheet, without having to include a sheet reference as an example, let’s modify our receipt example to use the name TaxRate again, but from the Tax Info sheet

23 Notice that TaxRate is not qualified by a sheet name.

24 Indirect Referencing cell/range references allow us to directly specify from which cell to grab a value =B6 (takes value from B6) spreadsheets also allow indirect referencing the value from one cell allow us to reference a value from a different cell example formulas: vlookup (vertical lookup) hlookup (horizontal lookup)

25 VLOOKUP – Vertical Lookup Searches for a value in the first column of a table array and returns a value in the same row from another column in the table array. syntax: =VLOOKUP( value, table, column, type) value – the value to find in the left column of table table – a range of cells column – the column to obtain the new value from type – FALSE for an exact search, TRUE otherwise

26 VLOOKUP – The Basic Idea (Exact Search) like a normal cell reference, you are basically specifying a row and column the column is the third input to the formula the row is found via a match with the first input YearCityTeam 1989CalgaryFlames 1990EdmontonOilers 1991PittsburghPenguins 1992PittsburghPenguins 1993MontrealCanadiens

27 VLOOKUP – The Basic Idea (Exact Search) suppose you want to find the city that won the Stanley Cup in 1991 the value to look for would be 1991, hence the third row the column is the 2 nd column (2) YearCityTeam 1989CalgaryFlames 1990EdmontonOilers 1991PittsburghPenguins 1992PittsburghPenguins 1993MontrealCanadiens YearCityTeam 1989CalgaryFlames 1990EdmontonOilers 1991PittsburghPenguins 1992PittsburghPenguins 1993MontrealCanadiens

28 VLOOKUP – The Basic Idea (Exact Search) suppose you want to find the team that won the Stanley Cup in 1989 the value to look for would be 1989 (first row) the column is the 3 rd column YearCityTeam 1989CalgaryFlames 1990EdmontonOilers 1991PittsburghPenguins 1992PittsburghPenguins 1993MontrealCanadiens

29 VLOOKUP – The Basic Idea (Exact Search) suppose you want to find the city that won the Stanley Cup in 1994 recall formula: VLOOKUP( value, table, column, type) first input: the value to find in the first column second input: the table (a range) third input: the column to get value from fourth input: FALSE (since this is an exact search)

30 VLOOKUP – The Basic Idea (Exact Search) suppose you want to find the team that won the Stanley Cup in 1999 recall formula: VLOOKUP( value, table, column, type) first input: the value to find in the first column second input: the table (a range) third input: the column to get value from fourth input: FALSE (since this is an exact search)

31 VLOOKUP – Copy and Fill often, VLOOKUP is used in multiple searches e.g. your assignment, you must find a letter grade for each student since VLOOKUP is a formula, it can be used in a copy and fill, like any other formula however, caution must be used e.g. modify our previous example, but find the Cup winners for 2003, 1998, and 1989

32 VLOOKUP – The Basic Idea (Exact Search) suppose you want to find the teams that won the Stanley Cup in 2003, 1998, and 1989 What if we use Fill to input the other values?

33 VLOOKUP – The Basic Idea (Exact Search) suppose you want to find the teams that won the Stanley Cup in 1994, 1998, and 2003 because the table is specified using relative references, the starting and ending row updates as we fill down therefore, the formula in F4 specifies a table from A4 to C18, which excludes the 1989 row

34 VLOOKUP – The Basic Idea (Exact Search) in almost all cases of VLOOKUP, the table is specified using absolute references this way, the table stays the same for all lookups

35 VLOOKUP – Approximate Search suppose you have the following table of data you want to add a column called generation 1946-1965: Baby boomers 1965-1979: Generation X 1980-1994: Generation Y 1995-2013: Generation Z how many rows would be required for a vlookup table? 1946, 1947, 1948, 1949,.... 68 rows http://www.scribd.com/doc/27999012/Generations-defined

36 Vlookup – Approximate Search fortunately, VLOOKUP allows us to do an approximate search simply change the last parameter to TRUE, or omit it when an approximate search is used, an exact match is still attempted if an exact match is not found, then the next largest value is matched

37 Example (approximate search): suppose our lookup value is 1965 since an exact match is found, it functions the same as the exact VLOOKUP Year StartedGen 1946Baby Boomer 1965Generation X 1980Generation Y 1995Generation Z Year StartedGen 1946Baby Boomer 1965Generation X 1980Generation Y 1995Generation Z

38 Example (approximate search): suppose our lookup value is 1981 since an exact match is not found, it finds the next largest value that does match Year StartedGen 1946Baby Boomer 1965Generation X 1980Generation Y 1995Generation Z Year StartedGen 1946Baby Boomer 1965Generation X 1980Generation Y 1995Generation Z

39 VLOOKUP – Approximate Search

40 after filling

41 VLOOKUP – Approximate Search note the result if we had used an exact search

42 VLOOKUP – Two Last Points 1) lookup tables are often placed in a separate sheet e.g. Assignment #3 like previous cell references, be sure to prepend table range with the name of the sheet, separated by the bang (!) operator

43 VLOOKUP – Two Last Points 2) an analogous method called HLOOKUP exists that performs similarly to VLOOKUP, but: matches a column based on lookup value row is specified


Download ppt "Computer Science 1000 Spreadsheets V Permission to redistribute or use these slides is strictly prohibited without permission."

Similar presentations


Ads by Google