Upload
ferdinand-norman
View
215
Download
0
Embed Size (px)
Citation preview
[email protected] • ENGR-25_Lec-28_Excel-1.ppt1
Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods
Bruce Mayer, PELicensed Electrical & Mechanical Engineer
Engr/Math/Physics 25
MS ExcelWorkSheet
s
[email protected] • ENGR-25_Lec-28_Excel-1.ppt2
Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods
Learning Goals
Enter Data into Excel• Use Copy and Fill
Perform Calculations Using Excel• Writing “Formulas”
– Proper Syntax– InterRelationship Between Cells
• Invoking and Using Built-in Functions
Explain the difference between ABSOLUTE and RELATIVE addresses
[email protected] • ENGR-25_Lec-28_Excel-1.ppt3
Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods
Learning Goals cont
Construct Charts and Graphs• Comparison Charts → Bar, Col, Radar• Analysis Charts → Scatter, Surface
– Curve Fits → Linear Regression
[email protected] • ENGR-25_Lec-28_Excel-1.ppt4
Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods
SpreadSheets
SpreadSheet Defined
A table of values arranged in rows and columns. The Intersection of a Row & Column is Called a Cell. • Each cell-value can have a predefined
relationship to the other cell values.• If you change one cell-value other values
may change depending on the interrelationship of the cells.
[email protected] • ENGR-25_Lec-28_Excel-1.ppt5
Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods
MicroSoft Excel Excel is the MS-Office Application
program used to create spreadsheets Within Excel, users can organize data,
create charts, and perform calculations. Excel allows the user to create very large
spreadsheets, reference information from other spreadsheets, and it permits organized storage and modification of information
Excel operates like other MS Office programs and has many of the same functions and shortcuts as MSword & MSpowerpoint
[email protected] • ENGR-25_Lec-28_Excel-1.ppt6
Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods
Why Excel?
Excel can do most (not all) of the common (i.e., useful & popular) tasks done in MATLAB or similar software
Excel is much more accessible • MATLAB is Powerful, but it’s also
SPECIALIZED and EXPENSIVE• Excel is: Ubiquitous, and Quick & Easy
Excel is much more POWERFUL than Many people think
[email protected] • ENGR-25_Lec-28_Excel-1.ppt7
Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods
MSExcel 2010Specifications
http://office.microsoft.com/en-
us/excel-help/excel-specifications-and-limits-
HP010342495.aspx?CTT=5&origin=HP005199
291
17e9 cells/wksht
[email protected] • ENGR-25_Lec-28_Excel-1.ppt8
Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods
Excel WorkSheet (1) An Excel File is also Called a
WORKBOOK• Each workBOOK can
Contain a large number of workSHEETs (>200)
Where a column and a row intersect is called a CELL. • For example, cell B5 is
located where column B and row 5 meet. You enter your data into the cells on the Active (Displayed) worksheet
The tabs at the bottom of the screen represent different worksheets within a workbook.
Selected Cell
NAME BOX: Displays Selected Cell
Active WorkSheet
WorkSheet ScrollButtons
[email protected] • ENGR-25_Lec-28_Excel-1.ppt9
Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods
Excel WorkSheet (2)
Active Cell
The NAME BOX indicates what cell you are in. This cell is called the “active cell.” This cell is highlighted by a black box.
Text DOES appearin a Text Cell
The FORMULA BAR indicates the contents of the cell selected. Any formula created will appear in this space
The RESULT of the Formula will Appear in a Formula Cell; NOT The formula itself
[email protected] • ENGR-25_Lec-28_Excel-1.ppt10
Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods
Excel Data Types Spreadsheets can
contain Several types of data• Numbers• Text• Dates & Time
– Can Add, Subtract
• Currency• Charts• Equations• Pictures
[email protected] • ENGR-25_Lec-28_Excel-1.ppt11
Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods
Cell Addressing COLUMNS are
designated by alphabetical values such as A, B, C ….
ROWS are designated by numerical values such as 1, 2, 3 ….
Individual cells are designated by ordered pairs containing the row and column designation such as A1,C7, B10 ….
B10 =Active Cell
[email protected] • ENGR-25_Lec-28_Excel-1.ppt12
Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods
Excel DATA Entry Move the Mouse
Pointer to the Desired Cell
Click Cell to Make it Active, then do One of• Type Data DIRECTLY
Into the Cell• Move Cursor to
FORMULA BAR and type there Type in Cell
Type in Formula Bar
[email protected] • ENGR-25_Lec-28_Excel-1.ppt13
Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods
Excel FORMULA Entry
To Write a Formula, Rt-Clik the Cell To make it Active• Start Typing, OR• Type in Formula Bar
You can also calculate values using formulas.
The formula can perform mathematical operations using data from other cells.
[email protected] • ENGR-25_Lec-28_Excel-1.ppt14
Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods
Fill FORMULAS Enter the Formula in
One Cell Select the Formula
Cell, Bottom Rt Corner of selection Box turns to a “+”
Drag the the + up/down or Across
“Cell References” adjust automatically
[email protected] • ENGR-25_Lec-28_Excel-1.ppt15
Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods
Fill DATA If you need to enter an
INCREMENTED Data Series you can skip making a Formula, and Use FILL instead• Type the First 2 or 3 values
in the Sequence• Select the Data Cells,
Bottom Rt Corner of the selection Box turns to a “+”
• Drag the the + up/down or Across
[email protected] • ENGR-25_Lec-28_Excel-1.ppt16
Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods
Anatomy of a Formula
RELATIVE Reference; Changes when cell Filled, Copied or Moved
164231744 FCFFCB XxXxx X
ABSOLUTE Reference; Does NOT Change when cell Filled, Copied or Moved
MIXED Reference; COL (F) Changes, while ROW (16) Does NOT when moved or copied
[email protected] • ENGR-25_Lec-28_Excel-1.ppt17
Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods
Excel Built In Functions
SUM (math & trig) AVERAGE (statistical) SIN (math & trig) IF (logical) NPV (financial) CONCATENATE (text) LOOKUP (lookup and reference) Many More …
[email protected] • ENGR-25_Lec-28_Excel-1.ppt18
Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods
SUM(number1, number 2,…)
Example=SUM(5,7,11) equals 23
If cells A2:E2 contain 5, 15, 30, 40, 50:=SUM(A2:C2) equals 50
=SUM(A2:E2, 13) equals 153
[email protected] • ENGR-25_Lec-28_Excel-1.ppt19
Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods
AVERAGE(number 1, number 2,…) Example
REGION A1:E1 is NAMED “Luminance”
Then Several Average Calcs
[email protected] • ENGR-25_Lec-28_Excel-1.ppt20
Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods
SIN(number)
NOTE: Angle (number) must be provided in radians • If The argument is in degrees (°), Use the
RADIANS Fcn to convert it to radians.
Some SIN & COS Calcs
0.0
30sin
[email protected] • ENGR-25_Lec-28_Excel-1.ppt21
Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods
IF Function
The Syntax
Logical_test any value or expression that can be evaluated as TRUE or FALSE. • =IF(A10<=100,"Within budget","Over budget")• =IF(A10=100,SUM(B5:B15),"")
Value_if_true value returned if logical_test = TRUE Value_if_false value returned if logical_test = FALSE
• NOTE: Value_if_false can also be another formula.
Up to 64 IF functions can be nested in Excel 2010
IF(logical_test,value_if_true,value_if_false)
[email protected] • ENGR-25_Lec-28_Excel-1.ppt22
Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods
Logical Operators
EXCEL• = (equal to)• > (greater than) • < (less than) • >= (greater than or
equal-to)• <= (less-than or
equal-to)• <> (not equal to)
MATLAB• == (Equal To)• > (Greater Than)• < (Less Than)• >= (Greater Than or Equal-To)• <= (Less Than or Equal-To)• ~= (Not Equal To)
[email protected] • ENGR-25_Lec-28_Excel-1.ppt23
Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods
COUNTIF(range, criteria) Counts the number of cells within a
range that meet the given criteria Let C5:C8 contain "apples",
"oranges", "peaches", "apples", respectively:• COUNTIF(C5:C8,"apples") equals 2
Suppose P2:S2 contain 29, 54, 73, 86, respectively:• COUNTIF(P2:S2,">55") equals 2
[email protected] • ENGR-25_Lec-28_Excel-1.ppt24
Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods
Example Data Scaling (1)
Consider a NATION wide Survey of Engineering Baccalaureate New Grad Salaries
Now Examine Similar Data from UC Berkeley
UCB Salaries are Higher
66.461.1
60.459.358.9
56.353.6
52.450.550.4
49.349.0
48.345.2
42.742.1
40.740.039.9
39.038.4
36.536.5
35.535.4
32.732.3
31.2
0 5 10 15 20 25 30 35 40 45 50 55 60 65 70
Chemical EngineeringComputer Engineering
Computer ScienceElectrical Engineering
Mechanical EngineeringAero Engineering
Construction MgmntCivil Engineering
FinanceNursing
Logistics/Matl-MgmntMIS/DP
AccountingHuman Resources
MarketingBusiness Admin
Agricultural Mgmnt Political Sci
Criminal JusticeCommunications
HistoryTeacher, 9-12
Liberal ArtsForeign Language
Hospitality ServicesFitness/Recreation
PsychologyTeacher, k-8
Average Starting Salary ($k/yr)
Ba
ch
elo
rs D
eg
ree
Fie
ld NACE Bachelor's DegreeNew-Grad Salaries
Jul2010
Salary-Survey-2010_1007.xls
UC Berkeley Engineering Bachelor's New-Grad Salary • 2009
75.8
67.3
65.7
65.1
60.5
59.9
0 10 20 30 40 50 60 70 80
EE
Che
mE
MS
EM
EC
EIE
En
gin
eeri
ng
Dis
cip
lin
e
Median Starting Salary ($k/yr)file = Salary-Survey-2010_1007.xls
[email protected] • ENGR-25_Lec-28_Excel-1.ppt25
Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods
66.461.1
60.459.358.9
56.353.6
52.450.550.4
49.349.0
48.345.2
42.742.1
40.740.039.9
39.038.4
36.536.5
35.535.4
32.732.3
31.2
0 5 10 15 20 25 30 35 40 45 50 55 60 65 70
Chemical EngineeringComputer Engineering
Computer ScienceElectrical Engineering
Mechanical EngineeringAero Engineering
Construction MgmntCivil Engineering
FinanceNursing
Logistics/Matl-MgmntMIS/DP
AccountingHuman Resources
MarketingBusiness Admin
Agricultural Mgmnt Political Sci
Criminal JusticeCommunications
HistoryTeacher, 9-12
Liberal ArtsForeign Language
Hospitality ServicesFitness/Recreation
PsychologyTeacher, k-8
Average Starting Salary ($k/yr)
Ba
ch
elo
rs D
eg
ree
Fie
ld NACE Bachelor's DegreeNew-Grad Salaries
Jul2010
Salary-Survey-2010_1007.xls
EngineeringNoted in GREEN
Color
[email protected] • ENGR-25_Lec-28_Excel-1.ppt26
Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods
UC Berkeley Engineering Bachelor's New-Grad Salary • 2009
75.8
67.3
65.7
65.1
60.5
59.9
0 10 20 30 40 50 60 70 80
EE
Che
mE
MS
EM
EC
EIE
En
gin
eeri
ng
Dis
cip
lin
e
Median Starting Salary ($k/yr)file = Salary-Survey-2010_1007.xls
[email protected] • ENGR-25_Lec-28_Excel-1.ppt27
Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods
Example Data Scaling (2)
We want to NORMALIZE (i.e. Scale-UP) the National Data to Account for the higher Salaries (and Cost-of-Living) in the SF Bay Area
Use as Scale Factor the Avg Engineering Salaries
Take from the NACE Data The average of
66.461.1
60.459.358.9
56.353.6
52.450.550.4
49.349.0
48.345.2
42.742.1
40.740.039.9
39.038.4
36.536.5
35.535.4
32.732.3
31.2
0 5 10 15 20 25 30 35 40 45 50 55 60 65 70
Chemical EngineeringComputer Engineering
Computer ScienceElectrical Engineering
Mechanical EngineeringAero Engineering
Construction MgmntCivil Engineering
FinanceNursing
Logistics/Matl-MgmntMIS/DP
AccountingHuman Resources
MarketingBusiness Admin
Agricultural Mgmnt Political Sci
Criminal JusticeCommunications
HistoryTeacher, 9-12
Liberal ArtsForeign Language
Hospitality ServicesFitness/Recreation
PsychologyTeacher, k-8
Average Starting Salary ($k/yr)
Ba
ch
elo
rs D
eg
ree
Fie
ld NACE Bachelor's DegreeNew-Grad Salaries
Jul2010
Salary-Survey-2010_1007.xls
[email protected] • ENGR-25_Lec-28_Excel-1.ppt28
Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods
All Done for Today
YouTubeExcel
Tutorials
Google Videos → Excel Tutorials
[email protected] • ENGR-25_Lec-28_Excel-1.ppt29
Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods
Bruce Mayer, PELicensed Electrical & Mechanical Engineer
Engr/Math/Physics 25
Appendix
6972 23 xxxxf tfyyy
735
[email protected] • ENGR-25_Lec-28_Excel-1.ppt30
Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods
Demo Start = Demo_Salary-Survey_Scaling_Demo-Start_1012.xls
[email protected] • ENGR-25_Lec-28_Excel-1.ppt31
Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods
Demo CALC = File Demo_Salary-Survey-2004_Scaling_0511.xls
[email protected] • ENGR-25_Lec-28_Excel-1.ppt32
Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods
Demo Result from CHART WIZARD w/ Fine Tuning = File Demo_Salary-Survey-2004_Scaling_0511.xls