www.engineersdaily.com
Formula bar
Name box
Active cell
Columns
Rows
Sheet tabs
Active sheet
Office Button
Quick access toolbar
Ribbon tabs
Title bar
Ribbon (Home)
Dialog launcher
C4 is cell address
Zoom slider
Status bar
A cell address (reference) begins with the column and then the row. Address C4 is
one cell. A range of adjacent cells can be indicated like A10:A20. The separator is a
colon and this would be 11 cells from A10 to A20. Range H:H, would include all cells
in column H. Range 5:5, would include all cells in row 5. Range B15:E15, would
include four cells. If you would like to indicate non-adjacent cells, use a comma as
the separator. C2,D15 would be two cells. You can select adjacent cells by clicking
the first cell, hold the shift key down and select the last cell. You can select nonadjacent cells by holding down the control key while clicking on the cells.
A single cell can contain 32, 767 characters. There are 17,179,869,184 cells in each
worksheet.
Example 1
Create a spreadsheet to calculate the bending moment at one foot intervals along
the length of a 12 foot beam. The uniform load is q = 500 lb/ft. The bending
moment is in units of ft-lbs. The equation to calculate the bending moment is:
In cell A1, hold down the control key and press B. This will make what you type
bold. Now type in Bending moment example. To enter data into a cell, select the
cell and type what you want to enter and then press the Enter key,
key, key,
key or the key.
In cell A3, type Distance. In cell A4, type (ft). In cell B4, type Bending and then
hold the Alt key while you press the Enter key. This allows a multiple line entry.
Now type moment and press enter. In cell B4, type (ft-lbs).
In cell A6, type the number 1 and in cell A7, type the number 2. Grab the fill handle
while holding down your left mouse button and drag down column A to row 18.
We need to insert some rows. Select rows three and four with your mouse on the
row headings. Right click on the 3 or 4 and select Insert from the pop-up menu.
This will insert two rows above row three.
In cell E3, type Uniform, hold the Alt key while pressing the Enter key and type
load. In cell B3, type the number 500. Press the right arrow key to move to cell C3.
In cell C3, type lb/ft.
500 lb/ft
Bending
Distance moment
(ft)
(ft-lbs)
0
1
2
3
4
5
6
7
8
9
10
11
12
Select rows five and six. Right click on row heading five or six and select Insert.
This will insert two rows above row 5.
500 lb/ft
Bending
Distance moment
(ft)
(ft-lbs)
0
1
2
3
4
5
6
7
8
9
10
11
12
In cell A5, type Beam. Hold down the Alt key and press the Enter key. Type length
and press the Enter key. In cell B5, type the number 12 and press the right arrow
key. Now you are in cell C5 so type ft.
Bending moment example
Uniform
load
Beam
length
500 lb/ft
12 ft
Bending
Distance moment
(ft)
(ft-lbs)
0
1
2
3
4
5
6
7
8
9
10
11
12
In the equation, $B$3, is an absolute cell reference. This means, it does not change
when copied or moved. The value of 500 will be used in every equation. Cell B3
contains the value of the variable q. Cell B5 is the variable L and cell A10 is the
variable x. If I copy cell B10 down to cell 11, the cell reference A10 will change to
A11 but B3 and B5 will not change. Cell A10 is a relative cell reference. B10 should
be zero.
(), parenthesis
^, raising to the power
* and /, multiplication and division
+ and -, addition and subtraction
Excel will perform on parenthesis first. It will perform addition and subtraction last.
If there are two operators of the same precedence, then it performs them from left
to right.
Select cell B10, grab the fill handle with the left mouse button held down and drag
to cell B22. This will fill the cells with new calcualted values.
Select cells A3 to A5 with the left mouse button. Make sure the Home ribbon tab is
active. In the Alignment portion of the ribbon, click the Align Text Right button. This
will right justify the data in these cells. In the Name box, type B3,B5 and press the
Enter key. Now click the Center button in the Alignment portion of the ribbon. This
will center the numbers 500 and 12. Click on cell A7. Hold down the shift key and
click on cell B22. This will select cells A7:B22. Now click the Center button on the
ribbon. Our spreadsheet should be formatted as shown:
Right click on the sheet tab at the bottom of the worksheet and select Rename.
Type in Moment and press the Enter key.
Hold down the control key and select with the left mouse button cells B3, B12 and
A10 to A22. On the Font portion of the Home ribbon, click the pull-down arrow for
the Fill Color button. Select Tan, Background 2 and all the cells will be that color. In
the Name box, type B10:B22 and hit the Enter key. This will select the cells from
B10 to B22. On the Font portion of the Home ribbon, click the pull-down arrow for
the Fill Color button and select Orange, Accent 6. Select cells, A7 and A8. On the
Font portion of the ribbon, click the pull-down arrow for the Border button and
select Thick Outside Borders. Do the same for cells B7 and B8. Select cells
A10:B22. Click the pull-down arrow for the Border button and select All Borders.
NOTE: Hold down the Control key and press the number 1 key to open the Format
Cell dialog box. This is used to format, do font changes, add borders and fill the
cells with color.
500
lb/ft
Beam
length
12
ft
Distance
(ft)
Bending
moment
(ft-lbs)
0
1
2
3
4
5
6
7
8
9
10
11
12
0
2750
5000
6750
8000
8750
9000
8750
8000
6750
5000
2750
0
We have added color and borders to our worksheet. This is how it will look when
printed.
Now we would like a graph of this data. Microsoft calls a graph a chart. You should
create a chart sheet and not embed your graph (chart) in your worksheet. You can
plot 32,000 points in a 2-D chart with up to 255 lines (series). You can only have
4,000 points in a 3-D chart. Here are some guidelines for making a graph:
GRAPH (CHART)
TYPES:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
Line or pictorial
There are many chart types in Excel. Types of charts in Excel: Column, Line, Pie,
Bar, Area, X-Y (Scatter), Stock, Surface, Doughnut, Bubble and Radar. Most of
them are pictorial type graphs and are not applicable to engineering. Most
engineering data should be plotted using the X-Y (Scatter) type. Most data will be
plotted using the Scatter with Smooth Lines and Markers. Excel can do log-log and
semi-log graphs. Excel can add a trend line and display the equation for the line on
the graph.
Select the data to be plotted, cells A10 to B22. Click the Insert ribbon tab. On the
Chart portion of the Insert ribbon, click the pull-down arrow for the Scatter type
and select Scatter with Smooth Lines and Markers.
In the upper right corner, click Move Chart. In the Move chart dialog box, click the
radio button for New sheet. Type in the text box, MomentG and click the OK button.
Now you have created a new chart sheet and the graph is no longer embedded in
the worksheet.
In the Chart Layouts portion of the Design ribbon, click the one on the left (Layout
1).
Now our graph should have a title. Right click on the Chart Title and select Edit
Text. Hold down the Control key and press A to select all the text. Type Moment
Diagram, into the text box. Now we dont need a legend since we only have one
curve, so right click on Series 1 and select Delete. Right click on the X-Axis Title
and select Edit Text. The X-Axis Title label and unit is, Distance (ft). Do the same
for the Y-Axis Title which is, Bending Moment (ft-lbs). Right click on the X-Axis and
select Add Major Gridlines.
Right click on the X-Axis again and make the following changes in the dialog box:
Just add Minor tick marks to the Y-Axis. This is a rectangular graph (chart).
Moment Diagram
10000
9000
8000
7000
6000
5000
4000
3000
2000
1000
0
0
6
Distance (ft)
10
11
12
Power (watts)
0
0
10
Load Resistance ( )
Notice the ohm symbol on the X-axis title. To make the symbol, hold down the
Alt key and type 234 on the numeric keypad only and then let up on the Alt key.
Again we have a rectangular graph. Again we did most of the items listed on the
graph guidelines. Try to make you graph just like the one above using all the things
we have covered.
Use the following chart to do special characters by holding down the Alt key and
pressing the number from the numeric key pad. Alt + 247 for
Example 3
Make a log-log graph, add a trend line and display the equation on the chart. Now
we will have to show the major and minor grid lines on each axis.
Here is the data we want to plot.
Select the Insert ribbon tab. Select the data to be plotted with your mouse or type
in the Name box, A4:B17 and press enter. In the Chart portion of the Insert ribbon
select the pull-down arrow for Scatter. Select Scatter with Smooth Lines and
Markers from the pop-up menu. In the upper right corner click on Move Chart.
Select the radio button in front of New sheet and type into the text box, SteelG.
35.000
30.000
25.000
20.000
Series1
15.000
10.000
5.000
0.000
0.00
0.50
1.00
1.50
2.00
2.50
3.00
3.50
4.00
Select Layout 1 on the Chart Layouts portion of the Design ribbon tab.
Chart Title
35.000
30.000
25.000
Axis Title
20.000
Series1
15.000
10.000
5.000
0.000
0.00
0.50
1.00
1.50
2.00
Axis Title
2.50
3.00
3.50
4.00
Right click on the Chart Title and select edit text from the pop-up menu. Hold down
the Control key and press A to select all text. Type into the text box, Size vs.
Weight. Right click on the X-axis title and select edit text. Hold down the Control
key and press A to select all text. Type into the text box, Size (in). Also change the
font points to 12 points. Right click on the Y-axis title and change the point size to
12 points. It takes 72 point to make a character 1 inch tall. Right click on the Y-axis
title again. Select edit text from the pop-up menu. Do Control + A again to select
all and type Weight (lb/ft). Right click on Series 1 and press the delete key. Right
click on the numbers of the X-axis and select Add Major Gridlines. Do it again and
select Add Minor Gridlines. Right click on the number of the Y-axis and select Add
Minor Gridlines.
Chart Title
35.000
30.000
Weight (lb/ft)
25.000
20.000
15.000
10.000
5.000
0.000
0.00
0.50
1.00
1.50
2.00
2.50
Size (in)
3.00
3.50
4.00
We need to make the major unit 1 on the X-axis and check the Logarithmic scale.
These two changes are under the Axis Options. We also need to change the
decimals to 1and that is under Number. We also need to make the crossing 0.1 on
The X-axis. On the Y-axis, we only need to change the decimals to 1 and check
Logarithmic scale and change the crossing to 0.1.
Right click on the X-axis and select Format Axis. Make the changes. Right click on
the Y axis and make the changes.
Weight vs Size
100.0
Weight (lb/ft)
10.0
1.0
0.1
0.1
1.0
10.0
Size (in)
This is looking pretty good. We still need to add a trend line and the equation.
Right click on the straight, blue line and select Add Trendline from the pop-up
menu. Select the radio button in front of Power. Place a check mark on Display
Equation on the chart.
Click the close button. Grab the equation with your left mouse button held down to
a place near the title. Right click on the equation and change the font size to 14
points. Click on the Insert ribbon tab. In the Illustrations portion click the pull-down
arrow for Shapes. Select Arrow. With your left mouse, draw an arrow from the
equation to the straight, blue line.
Weight vs Size
y = 2.6703x1.9996
100.0
Weight (lb/ft)
10.0
1.0
0.1
0.1
1.0
10.0
Size (in)
Now we have added a trend line, displayed the equation on the graph and
annotated the graph with an arrow. A log-log graph is logarithmic on both the X
and Y axis. The X-axis has two cycles and the Y-axis has three cycles. Our graph
really is looking good. We could add color to make it look some better.
Example 4
Make a semi-log graph with altitude the logarithmic scale. Add a trend line and
display the equation on the graph.
Altitude
(feet above
sea level)
Barometric
Pressure
(inches of
mercury)
500
1000
1500
2000
2500
3000
4000
5000
6000
7000
8000
9000
10000
15000
29.39
28.86
28.34
27.82
27.32
26.82
25.84
24.90
24.00
23.10
22.20
21.40
20.60
16.90
Make the minimum on the Y-axis 15 and the minimum on the x-axis 100. You
graph should look like this:
Pressure vs Altitude
31
29
27
25
23
21
19
17
15
100
1000
10000
100000
Excel can do so much more. Excel has 341 built-in worksheet functions. It has one
very powerful function, Convert. It can convert all of the following and more:
Example 5
CONVERSIONS
1 3142 ft
km
liter
97 gal
97 F
4 9488 gm
slugs
lbf
535 N
23 Pa
mm of Mercury
538 ft-lb
BTU
600 hp
9
10
2 days
25 erg
sec
joules
From_unit or to_unit
Gram
"g"
Slug
"sg"
"lbm"
"u"
"ozm"
From_unit or
to_unit
Distance
Meter
"m"
Statute mile
"mi"
Nautical mile
"Nmi"
Inch
"in"
Foot
"ft"
Yard
"yd"
Angstrom
"ang"
"Pica"
Time
From_unit or to_unit
Year
"yr"
Day
"day"
Hour
"hr"
Minute
"mn"
Second
"sec"
Pressure
From_unit or to_unit
Pascal
Atmosphere
mm of Mercury
"mmHg"
Force
From_unit or to_unit
Liquid measure
From_unit or to_unit
Newton
"N"
Teaspoon
"tsp"
Dyne
Tablespoon
"tbs"
Pound force
"lbf"
Fluid ounce
"oz"
Cup
"cup"
From_unit or to_unit
U.S. pint
Joule
"J"
U.K. pint
"uk_pt"
Erg
"e"
Quart
"qt"
Thermodynamic calorie
"c"
Gallon
"gal"
IT calorie
"cal"
Liter
Electron volt
Horsepower-hour
Watt-hour
Foot-pound
"flb"
BTU
Energy
Power
From_unit or to_unit
Horsepower
Watt
Magnetism
From_unit or to_unit
Tesla
"T"
Gauss
"ga"
Temperature
From_unit or to_unit
Degree Celsius
Degree Fahrenheit
Kelvin
The following abbreviated unit prefixes can be prepended to any metric from_unit or to_unit.
Prefix
Multiplier
Abbreviation
exa
1E+18
"E"
peta
1E+15
"P"
tera
1E+12
"T"
giga
1E+09
"G"
mega
1E+06
"M"
kilo
1E+03
"k"
hecto
1E+02
"h"
dekao
1E+01
"e"
deci
1E-01
"d"
centi
1E-02
"c"
milli
1E-03
"m"
micro
1E-06
"u"
nano
1E-09
"n"
pico
1E-12
"p"
femto
1E-15
"f"
atto
1E-18
"a"
Select the cell where you want the answer displayed. Click the insert function
button, fx to the left of the Formula Bar. In the dialog box, click the All category.
Click in the select a function area and type in Conv really fast. You should be on the
CONVERT function. Click the OK button when you are on the function.
Did you type the 10 conversions to be done into Excel? You try to convert the rest.
CONVERSIONS
1 3142 ft
2
3
97 gal
97 F
0.9576816 km
367.264839 liter
36.1111111 C
4 9488 gm
0.65013721 slugs
120.272774 lbf
535 N
23 Pa
0.17251419 mm of Mercury
600 hp
9
10
2 days
25 erg
447420.6 W
172800 sec
2.5E-06 joules
I didnt get the same on my calculator for number 7. I got 538 ft-lbs = 0.69137
BTUs.
Hold down the Control key and press the ~ key to the left of the number one key.
This will show all the equations. Here it is with the equation.
CONVERSIONS
1
3142 ft
=CONVERT(3142,"ft","km")
km
97
=CONVERT(B5,"gal","l")
liter
=CONVERT(97,"F","C")
gal
97 F
9488 gm
=CONVERT(B9,"g","sg")
slugs
535
=CONVERT(B11,"N","lbf")
lbf
23
Pa
=CONVERT(B13,"Pa","mmHg")
mm of Mercury
538
ft-lb
=CONVERT(538,"flb","BTU")
BTU
600
hp
=CONVERT(B17,"HP","W")
days
=CONVERT(B19,"day","sec")
sec
erg
=CONVERT(B21,"e","J")
joules
10 25
Example 6
You could click the box to the right of the text box. In the worksheet you would
select with your mouse the cells B6 to B25 and press the enter key twice. In Excel
there are usually several way to perform many tasks or functions. Find one way
that you like and stick with it. The object is to be productive so the fastest way you
can perform any tasks in Excel would be the best.
In cell B31, type =MODE(B6:B25). It doesnt matter if it is upper case or not for the
function or the cell address.
In cell B32, type =min(b6:b25)
In cell B33, type =max(b6:b25)
In cell B34, type =var(b6:b25)
In cell B35, type =stdev(b6:b25)
Height
(in)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
70.6
71.1
73.3
72.6
70.0
71.6
66.5
71.1
67.0
68.8
70.2
72.0
70.0
69.8
69.0
69.4
68.3
73.8
66.9
71.6
70.18
70.1
71.1
66.5
73.8
4.209
2.052
Function
Description
ABS
ACOS
ACOSH
ASIN
ASINH
ATAN
ATAN2
ATANH
Description
AVEDEV
Returns the average of the absolute deviations of data points from their mean
AVERAGE
AVERAGEA
Returns the average of its arguments, including numbers, text, and logical values
AVERAGEIF
Returns the average (arithmetic mean) of all the cells in a range that meet a given criteria
AVERAGEIFS
Returns the average (arithmetic mean) of all cells that meet multiple criteria.
BETADIST
BETAINV
Returns the inverse of the cumulative distribution function for a specified beta distribution
BINOMDIST
Description
BESSELI
BESSELJ
BESSELK
BESSELY
BIN2DEC
BIN2HEX
BIN2OCT
COMPLEX
CONVERT
DEC2BIN
DEC2HEX
DEC2OCT
Example 7
Excel can do 80 equations with 80 unknowns with no problem. First we create two
arrays and inverse the first one. Next we multiply the inverse of the first array by
the second array and we get our solution array.
First array
1
1
1
1
1
3
4
2
Second array
1
26
47
11
1
6
10
3
1
10
20
4
In cell H20, type =. This tells Excel the = sign is text and not the beginning of an
equation. Select the cells B19:E22 and type in {=MINVERSE(B12:E15)}. DO NOT
PRESS ENTER. Hold down the Control key, then hold down the Shift key and then
press the Enter key. Array B12:E15, is the array that we want to inverse. The {}
symbols indicate to Excel that we are doing something with an array or matrix.
Array B19:E22, is where we want to display the results.
Now we want to multiply the inversed array by the second array and display the
results in array, J19:J22. Select the cells J19 to J22. Click the Insert Function
button. Select the Math & Trig category. Click in the Select a function area and type
in mm, really fast. The MMULT function should be highlighted. If it is highlighted,
click the OK button.
Type B19:E22 into the text box for Array 1. Type G19:G22 in to the text box for
Array 2. DO NOT CLICK THE OK BUTTON. Hold down the Control key and then
hold down the Shift key and press the Enter key. The answer should be displayed in
cells J19 to J22.
Example 7
First array
1
1
1
1
1
3
4
2
1
6
10
3
1
10
20
4
4
-11
10
-3
Second array
-1
3
-3
1
-6
14
-11
3
1
26
47
11
a=
b=
c=
d=
-5
3
2
1
It looks correct.
Summary
We have created many work sheets and chart sheets. We created chart sheets with
rectangular, log-log and semi-log graphs. We added trend lines, displayed the
equation on the graph and annotated our graph. We have used built-in functions to
perform unit conversions, statistical computations and matrix computations. I dont
see how engineers ever made it without Excel. It is a great tool for engineers. You
have been shown many things that are not included in most books on Excel. I hope
this course will help you enjoy the benefits of Excel 2007 for Engineers.