48
1 CS 106 Computing Fundamentals II Chapter 4 “Excel Basics for Mac” Herbert G. Mayer, PSU CS Herbert G. Mayer, PSU CS status 6/27/2013 status 6/27/2013 Initial content copied verbatim from Initial content copied verbatim from CS 106 material developed by CS 106 material developed by CS professors: Cynthia Brown & Robert Martin CS professors: Cynthia Brown & Robert Martin

CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

  • Upload
    karis

  • View
    41

  • Download
    0

Embed Size (px)

DESCRIPTION

Herbert G. Mayer, PSU CS status 6/27/2013 Initial content copied verbatim from CS 106 material developed by CS professors: Cynthia Brown & Robert Martin. CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”. Syllabus. Excel Versions Workbook Excel Sheets Controls - PowerPoint PPT Presentation

Citation preview

Page 1: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

1

CS 106Computing Fundamentals II

Chapter 4“Excel Basics for Mac”

Herbert G. Mayer, PSU CSHerbert G. Mayer, PSU CSstatus 6/27/2013status 6/27/2013

Initial content copied verbatim fromInitial content copied verbatim fromCS 106 material developed byCS 106 material developed by

CS professors: Cynthia Brown & Robert MartinCS professors: Cynthia Brown & Robert Martin

Page 2: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

2

Syllabus Excel VersionsExcel Versions

WorkbookWorkbook

Excel SheetsExcel Sheets

ControlsControls

Adding DataAdding Data

Excel FormulasExcel Formulas

Absolute and Relative NamesAbsolute and Relative Names

FunctionsFunctions

Page 3: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

3

Excel Versions

• You will need Excel 2011 on a Mac. Earlier versions You will need Excel 2011 on a Mac. Earlier versions will not work for our purposes.will not work for our purposes.

• You can use Excel 2010 or 2007 on Windows. They You can use Excel 2010 or 2007 on Windows. They are quite similar.are quite similar.

Page 4: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

4

Choose the Workbook…

Page 5: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

5

This is a typical new workbook.

Page 6: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

6

Workbook made up of Spreadsheets

Tabs let you switch between sheets

Page 7: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

7

Rename a sheet by double clicking and typing a new name

Here I renamed Sheet1 as tab1

Page 8: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

8

Adding Sheets

Just click here

Page 9: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

9

Multiple Sheets

• Many times you will only need one sheetMany times you will only need one sheet

• Multiple sheets can help you organize your workMultiple sheets can help you organize your work

• For example, you might want a sheet for each time For example, you might want a sheet for each time period, like a week, month, or quarterperiod, like a week, month, or quarter

• Or, if you have multiple stores, you might want one Or, if you have multiple stores, you might want one for each storefor each store

Page 10: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

10

Controls

Page 11: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

11

Ribbons Plus Menus

• The newest Microsoft Office programs under Mac The newest Microsoft Office programs under Mac have ribbons that run across the top of the window; have ribbons that run across the top of the window; they also have menusthey also have menus

• Controls in ribbons are grouped into tabs and within Controls in ribbons are grouped into tabs and within the tabs are grouped into functional categoriesthe tabs are grouped into functional categories

• On some items, a small downward triangle can be On some items, a small downward triangle can be clicked to show optionsclicked to show options

Page 12: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

12

The Home Tab

Quick access items

Qi

Group names

Main ribbon tabsQ

i

Menus

Page 13: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

13

Using the Controls

• Many controls you use frequently are on the home tabMany controls you use frequently are on the home tab

• Check out the other tabs and the menus to get a Check out the other tabs and the menus to get a feeling for what is therefeeling for what is there

• The built-in help is very goodThe built-in help is very good

• In a separate short presentation, we show you how to In a separate short presentation, we show you how to make the make the Developer tab Developer tab show upshow up

Page 14: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

14

Structure of a Spreadsheet

Page 15: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

15

A sheet is a grid of cells

Row numbers

Column names

Page 16: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

16

A Cell is named by Column and Row

Cell A1 is selected and its nameis shown in the name box; youselect a cell by clicking it

Page 17: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

17

Cell C1

Page 18: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

18

Cell B2

Page 19: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

19

Cell G17

Page 20: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

20

Adding Data

Page 21: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

21

Type Directly into Selected Cell

Page 22: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

22

Types of Data

• Excel can handle various kinds of numbers, strings of Excel can handle various kinds of numbers, strings of characters (text), and datescharacters (text), and dates

• Most of the ordinary formatting can be handled by the Most of the ordinary formatting can be handled by the home tab controlshome tab controls

Page 23: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

23

Number Formatting Group

Use this group to formatnumbers as currency, percent, etc.

To format a whole column or row,click on the column letter or rownumber

Page 24: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

24

Tapping the Power of Excel

• Suppose I want to fill the first column with numbers Suppose I want to fill the first column with numbers 1000, 2000, 3000 etc up to 20,0001000, 2000, 3000 etc up to 20,000

• I could just type them but that would be sillyI could just type them but that would be silly

• Instead, use an Excel formula to accomplish this taskInstead, use an Excel formula to accomplish this task

• To type a formula you must start with an = signTo type a formula you must start with an = sign

Page 25: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

25

A Formula: = A1+1000

When writing a formula, you don’t have to typethe name of a cell you want to use. Just click on itand it will show up in the formula.

Page 26: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

26

Now I push return…

Page 27: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

27

Now the good part…

• I’m going to copy the formula by selecting the cell it’s I’m going to copy the formula by selecting the cell it’s in and clicking the copy icon in the clipboard group at in and clicking the copy icon in the clipboard group at the left of the home ribbonthe left of the home ribbon

• Then I will drag the cursor down the A column from Then I will drag the cursor down the A column from row 3 to 20; Excel will highlight itrow 3 to 20; Excel will highlight it

• Then I will click the paste iconThen I will click the paste icon

Page 28: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

28

Just before clicking Paste

Page 29: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

29

Just after clicking Paste

Note that cell A3 has formulaA2+1000!

Page 30: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

30

Relative Names

• So when I copy formula So when I copy formula =A1+1000 =A1+1000 from cell A2 into from cell A2 into cell A3, it becomes A2+1000cell A3, it becomes A2+1000

• When I copy it to cell A4, it becomes A3+1000, etc.When I copy it to cell A4, it becomes A3+1000, etc.

• This is because the A1 in the original formula is a This is because the A1 in the original formula is a RELATIVE name. It is the cell directly above cell A2, RELATIVE name. It is the cell directly above cell A2, where I am writing the formulawhere I am writing the formula

• When I copy the formula, Excel replaces A1 with the When I copy the formula, Excel replaces A1 with the name of the cell directly above the one where I’m name of the cell directly above the one where I’m putting the copyputting the copy

Page 31: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

31

Relative Names Illustration

Here I put 50 in cell E1 and then copied the formula from cell A2 to cell E2. You can see that Excel changed the formula to use E1 instead of A1, because E1 is directly above E2

Page 32: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

32

Absolute Names

• Suppose I really want to use a particular cell, and Suppose I really want to use a particular cell, and don’t want Excel to change it in the formula when I don’t want Excel to change it in the formula when I copy the formulacopy the formula

• Let’s say I want to put a number in cell A1, another Let’s say I want to put a number in cell A1, another number in A2, and then add them and put the answer number in A2, and then add them and put the answer in A3. Then for subsequent rows I want to add A1 in A3. Then for subsequent rows I want to add A1 each time. So if I start with 10 in A1 and 20 in A2, I each time. So if I start with 10 in A1 and 20 in A2, I should then get 30, 40, 50 etc.should then get 30, 40, 50 etc.

• Let’s look at what happens if I go with my first idea: Let’s look at what happens if I go with my first idea: to put to put =A1+A2 =A1+A2 in A3 and then copy itin A3 and then copy it

Page 33: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

33

Instead of what I wanted, I got:

I wanted the formula for A4 to be=A1+A3, but instead it is =A2+A3

Instead of keeping the A1, Excel used the two preceding cells, A2 and A3

Page 34: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

34

$ Makes a Name Absolute

• $ fixes the row and/or column of a cell name$ fixes the row and/or column of a cell name

• So instead of So instead of =A1+A2=A1+A2, I’ll use , I’ll use =$A$1+A2 =$A$1+A2 to fix both to fix both the row and columnthe row and column

• Let’s see what happens…Let’s see what happens…

Page 35: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

35

This is what I wanted!

Page 36: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

36

If I change Numbers in A1 & A2?

Excel automatically recomputes the rest of the column based on the formula! This is one of the great things about using Excel: it lets you try different numbers in “what if” scenarios.

Page 37: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

37

Use Similar Formula in other Col?

• I can make a formula where the row is fixed and the I can make a formula where the row is fixed and the column is relative, or vice versacolumn is relative, or vice versa

• In this case, instead of In this case, instead of =$A$1+A2=$A$1+A2, I’ll use the formula , I’ll use the formula =A$1+A2=A$1+A2. So the column is relative, but I am always . So the column is relative, but I am always using the item in row 1. Let’s copy it to column G, put using the item in row 1. Let’s copy it to column G, put some numbers in row 1 and 2 of that column, and some numbers in row 1 and 2 of that column, and give it a try…give it a try…

Page 38: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

38

Here the Result

The formula =A$1+A2from cell A3 copied over to be =G$1+Gn, where n is the number of the preceding row

Page 39: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

39

Actual Names

• You can give any cell an actual user-defined name You can give any cell an actual user-defined name that will be absolute and usable on every sheet in the that will be absolute and usable on every sheet in the workbook and in all its formulasworkbook and in all its formulas

• Just click on the cell, type the name in the name box, Just click on the cell, type the name in the name box, and hit returnand hit return

• This can make your formulas more readable!This can make your formulas more readable!

Page 40: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

40

Functions

• Functions are found in the Formula tabFunctions are found in the Formula tab

• Excel has many useful functions to useExcel has many useful functions to use

• The are in categories such as Financial, Logical, Text, The are in categories such as Financial, Logical, Text, etc., and there are many math and statistical etc., and there are many math and statistical functionsfunctions

• We’ll be learning to write our own functions, tooWe’ll be learning to write our own functions, too

Page 41: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

41

Using the formulas tab

I clicked the small triangle next to fx to get the listof function categories

Page 42: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

42

The function TODAY returns today’s date

Page 43: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

43

I clicked on the function to insert it in a formulain cell C2

Page 44: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

44

Here’s the resulting value. It will update to the current date whenever you open the workbook,so don’t use it if you want it to stay on a particular day.

Page 45: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

45

More Complex Functions

• ““TODAY” is a pretty simple example. It doesn’t take TODAY” is a pretty simple example. It doesn’t take any arguments any arguments

• More complex functions can be applied to More complex functions can be applied to spreadsheet cells or groups of cells (as in SUM or spreadsheet cells or groups of cells (as in SUM or AVERAGE)AVERAGE)

• Use them in your formulas when you need them; it Use them in your formulas when you need them; it saves time over writing your own calculationsaves time over writing your own calculation

Page 46: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

46

Here I want to add a list of numbers. So I typed“=SUM(“ and then selected the list of numbers.You can see how Excel has filled in the notation A1:A17, which refers to this list. I’ll finish by typingthe closing parenthesis and pushing Return.

Page 47: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

47

Here’s the final result.

Page 48: CS 106 Computing Fundamentals II Chapter 4 “ Excel Basics for Mac ”

48

Try It!

• If any of this is new to you, open up a spreadsheet If any of this is new to you, open up a spreadsheet and try these ideas for yourselfand try these ideas for yourself

• Experiment with relative and absolute names and Experiment with relative and absolute names and with formulaswith formulas

• By now we have only scratched the surface of ExcelBy now we have only scratched the surface of Excel