Problem Solving With Spreadsheet Programs (MS-Excel)
Problem Solving With Spreadsheet Programs (MS-Excel)
Problem Solving With Spreadsheet Programs (MS-Excel)
with
Spreadsheet Programs
(MS-Excel)
i
Contents
Introduction ............................................................................................................................................ 1
MS EXCEL ............................................................................................................................................. 1
1.0 Basic Skills ................................................................................................................................... 2
1.1 Starting MS Excel ........................................................................................................................... 2
1.2 Quitting MS Excel .......................................................................................................................... 2
1.3 Overview of Creating or Opening Workbooks ............................................................................... 2
1.4 Creating a new workbook ............................................................................................................... 3
1.5 Opening a workbook....................................................................................................................... 3
1.6 Opening a recently opened workbook ............................................................................................ 3
1.7 Opening several workbooks at one time ......................................................................................... 3
1.8 Starting Microsoft Excel and opening a workbook automatically .................................................. 4
1.9 Overview of Saving and Closing Workbooks ................................................................................. 4
1.10 Saving a workbook ....................................................................................................................... 4
1.11 Saving a workbook using a different name or file format ......................................................... 5
1.12 Saving your work automatically ............................................................................................... 5
1.13 Closing a workbook .................................................................................................................. 5
1.14 Closing all workbooks .............................................................................................................. 5
2. Excel 2003 and earlier versions specifications and limits ............................................................ 6
3. Overview of Entering Formula ..................................................................................................... 10
3.1 Entering Formula .......................................................................................................................... 10
3.2 Using the Function wizard ............................................................................................................ 10
3.3 Editing formulas containing functions with function wizards ....................................................... 11
3.4 Entering single sum formula with AutoSum button ...................................................................... 11
3.5 Entering multiple sum formula with AutoSum button .................................................................. 12
3.6 Entering grand totals with AutoSum button .................................................................................. 12
4. Error Messages ......................................................................................................................... 12
4. 1 #Div/0!........................................................................................................................................ 12
4.2 #N/A! ............................................................................................................................................ 13
4.3 #Value .......................................................................................................................................... 14
4.4 #NAME? ...................................................................................................................................... 14
4.5 #NULL! ........................................................................................................................................ 14
4.6 #NUM! ......................................................................................................................................... 15
4.7 #REF! ........................................................................................................................................... 15
5. Entering formulas ..................................................................................................................... 15
6. Entering data ............................................................................................................................ 16
7. Entering numbers in cells............................................................................................................. 16
8. Overview of Using AutoFill ......................................................................................................... 17
9. Incrementing a series of numbers or dates ................................................................................. 18
9.1 To increment a value in a single cell ............................................................................................ 18
9.2 To increment a series in two or more cells ................................................................................... 19
9.3 To increment a series with the shortcut menu ............................................................................... 19
9.4 To increment a series using the Series command ......................................................................... 19
10. Creating simple forecasts and trends ...................................................................................... 19
11. Editing or deleting a custom AutoFill list ............................................................................... 20
12. Types of Series ........................................................................................................................ 20
13. Referring to intersecting cell ranges ...................................................................................... 21
14. Overview of Copying and Moving Cells ................................................................................ 22
14.1 Copying cells .............................................................................................................................. 22
14.2 Moving cells ............................................................................................................................... 23
14.3 Pasting multiple copies ............................................................................................................... 24
14.4 Calculating as you paste ............................................................................................................. 24
14.5 Copying only the cell formula .................................................................................................... 25
14.6 Copying only the cell value ........................................................................................................ 25
15. Formatting cells ........................................................................................................................ 25
15.1 Adjusting column width .............................................................................................................. 25
15.2 Adjusting row height .................................................................................................................. 27
i
16. Worksheet data ......................................................................................................................... 28
16.1 Overview of Aligning Worksheet Data ....................................................................................... 28
16.2 Aligning data within cells ........................................................................................................... 28
16.3 Centring cell entries across columns ........................................................................................... 28
16.5 Wrapping text in cells ................................................................................................................. 29
16.6 Cells with Borders ...................................................................................................................... 29
16.7 Adding borders ........................................................................................................................... 29
17. Overview of Creating a Chart ................................................................................................. 30
17.1 What Is a Chart? ......................................................................................................................... 30
172 About the ChartWizard ................................................................................................................ 30
17.3 Creating a chart sheet in a workbook .......................................................................................... 30
17.4 Adding a chart title and axis titles............................................................................................... 31
17.5 Adding data labels ...................................................................................................................... 31
17.6 Adding gridlines ......................................................................................................................... 32
17.7 Deleting data labels, titles, legends, or gridlines ......................................................................... 32
ii
Introduction
Engineering work requires different types of software. There are two main groupings of software:
1) General purpose software that is used for various types of problems
2) Highly specific programs for specified type of problems only
Finite element programs, which can solve many different types of problems of extreme complexity,
belong to the former category. The programs are typically very large, in order to cater for different
problems, and complex. Types of problems that can be solved include one, two and three
dimensional stress analysis, heat transfer, mass transfer, etc. Because of their size and power, these
general finite element programs are less adaptable to Personal Computers (PC). On the other hand,
writing large number of problem specific programs to suit the second category is an enormous and
expensive undertaking. Hence what is required is a program with universal problem solving
characteristics of finite-element programs but easily adapted in today’s powerful PCs.
Spreadsheet programs are general-purpose software that is easily adapted in PC. These programs do
not have the power of much larger finite element programs but there are a wide variety of engineering
problems that are readily solvable using them.
Spreadsheet programs are meant for category b) problems. Advantages of current spreadsheet
programs are ease of use, less cost, high speed and ease of getting fancy output (charts). The main
disadvantage of these programs is the difficult to solve very complex problems (e.g. Navier-Stokes in
Fluid mechanics, fouling in heat exchangers, etc.).
PC spreadsheet program creates and electronic spreadsheet. The computer screen acts like a window
capable of moving about and viewing whatever portion of the spreadsheet you wish. Examples of
spreadsheet programs are Excel (in Office 95, Office 97, Office 2000 and Office XP), Lotus 1-2-3,
and Quattro Pro (in Corel Suit). All packages are relatively similar.
MS EXCEL
MS-Excel is an electronic spreadsheet program. The program can be used for:
i) Accounting and financial problems
ii) Statistical analysis
iii) Data Management
iv) Create business graphics
v) Operations research, etc.
Basic Idea
A worksheet, which is obtained when one starts Excel looks like the following
1
A B C D E F G
1
2
3
4
5
6
The grey part shows the Row numbers (1, 2, 3, etc.) and the Column letters (A, B, C, etc.). The
intersection of each row and column is called a CELL. Each cell has a name Cell name is the column
letter followed by the row number, e.g. A4. Excel has 256 columns (A to Z, AA to AZ, BA to
BZ,…,AV) and 65,536 rows. Some quick calculation shows that in order to display all of the cells in
the worksheet at the same size they usually appear would require a screen about 6 m wide and 878 m
high. Do we have such a tall building in Dar?
The complete document or the file you are working on is called a Workbook. Each workbook
contains various worksheets.
1. In Program Manager, double-click the Microsoft Excel group icon or other group icon that
contains Microsoft Excel.
When you start Microsoft Excel, the Quick Preview online tutorial may appear. If it does not
appear, you can start it yourself by choosing the Quick Preview command from the Help menu.
Shortcut: ALT+F4
If you have made changes to any open workbooks but have not saved them, Microsoft Excel
asks whether you want to save changes before you close the workbooks.
2. Choose the Yes button to save changes, choose the No button to discard changes, or choose the
Cancel button to cancel the command.
If you choose to save changes and if you have set calculation to manual with the Recalculate
Before Save check box selected, Microsoft Excel recalculates your workbook before saving it.
To interrupt recalculation, press ESC.
2
You can create a new workbook or open an existing workbook. You can also open several workbooks
at one time, or start Microsoft Excel and open a workbook automatically.
Click the New Workbook button or select New from File menu.
Shortcut: CTRL+N
The File Name box displays a list of the Microsoft Excel files in the current directory.
To see a list of Microsoft Excel files in another directory, select the directory from the
Directories box, or type the name of the directory in the File Name box. Then select Microsoft
Excel Files (*.XL*) from the List Files Of Type box.
To see a list of all the files in a directory, including Microsoft Excel files, select All Files (*.*)
from the List Files Of Type box.
To see a list of files on another disk, select the disk from the Drives box. If you cannot find the
workbook, choose the Find File button to search for the workbook.
If the workbook is on a network disk that you do not have access to, choose the Network
button to connect to that network disk.
2. In the File Name box, type the name of the file you want to open, or select it from the list.
3. Choose the OK button.
3
1.8 Starting Microsoft Excel and opening a workbook automatically
Double-click the workbook file icon in the Windows File Manager or Program Manager.
In Windows 3.1 or later, you can also drag the workbook file icon from File Manager to the
Microsoft Excel window or minimised Microsoft Excel icon.
You should frequently save your work. You can set up Microsoft Excel so that it automatically saves
your work at the time interval you choose. If you should lose work, you may be able to restore a
backup copy of your workbook. You can also save your work in other file formats.
To save a workbook
Shortcut: CTRL+S
2. If you have not saved the workbook before, the Save As dialog box will appear. In the File Name
box, type a name for the workbook or accept the proposed name.
The Microsoft Excel Workbook file format is automatically displayed in the Save File As Type
box. If you want to save the file in a format other than the Microsoft Excel Workbook file format,
select that format in the Save File As Type box.
4
If you save linked workbooks in different directories, make sure that you use the Save As command
on the File menu to save all source workbooks before you save the dependent workbooks, so that the
link references in the dependent workbooks are correct.
The Microsoft Excel Workbook file format is automatically displayed in the Save File As Type
box. If you want to save the file in a format other than the Workbook file format, select that
format in the Save File As Type box.
If the AutoSave command does not appear on the Tools menu, you need to install the AutoSave
add-in.
2. Select the Automatic Save check box, and then specify how often (in minutes) you want your
work saved.
3. Under Save Options, select what you want saved: the active workbook or all open workbooks.
4. If you want AutoSave to notify you before saving a workbook, select the Prompt Before Saving
check box.
5. Choose the OK button.
2. Choose the Yes button to save changes, the No button to discard changes, or the Cancel button to
cancel the command.
If the workbook hasn't been saved before, the Save As dialog box is displayed.
3. In the File Name box, type a name for the file or accept the proposed name.
4. Choose the OK button.
1. Hold down SHIFT and choose Close All from the File menu.
5
If there are unsaved changes, Microsoft Excel asks if you want to save changes.
2. Choose the Yes button to save changes, the No button to discard changes, or the Cancel button to
cancel the command.
If a workbook hasn't been saved before, the Save As dialog box is displayed.
3. In the File Name box, type a name for the file or accept the proposed name.
4. Choose the OK button.
Colors in a workbook 56
Named views (view: A set of display and print settings that you can Limited by available memory
name and apply to a workbook. You can create more than one view of
the same workbook without saving separate copies of the workbook.) in
a workbook
Panes in a window 4
Scenarios (scenario: A named set of input values that you can substitute Limited by available memory; a
in a worksheet model.) summary report shows only the first 251
scenarios
6
Feature Maximum limit
Undo levels 16
2) Workgroup specifications
Feature Maximum limit
Users who can open and share a shared workbook (shared workbook: A 256
workbook set up to allow multiple users on a network to view and make
changes at the same time. Each user who saves the workbook sees the
changes made by other users.) at the same time
Personal views (view: A set of display and print settings that you can Limited by available memory
name and apply to a workbook. You can create more than one view of the
same workbook without saving separate copies of the workbook.) in a
shared workbook
Days that change history (change history: In a shared workbook, 32,767 (default is 30 days)
information that is maintained about changes made in past editing
sessions. The information includes the name of the person who made
each change, when the change was made, and what data was changed.) is
maintained
Colors used to identify changes made by different users when change 32 (each user is identified by a separate
highlighting is turned on color; changes made by the current user
are highlighted with navy blue)
3) Calculation specifications
Feature Maximum limit
7
Feature Maximum limit
Iterations 32,767
Worksheet arrays Limited by available memory. Also, arrays cannot refer to entire columns. For
example, an array cannot refer to the entire column C:C or to the range
C1:C65536. However, an array can refer to the range C1:D65535 because the
range is one row short of the maximum worksheet size and does not include the
entire C or D column.
Arguments in a function 30
Earliest date allowed for January 1, 1900 (January 1, 1904, if 1904 date system is used)
calculation
PivotTable reports (PivotTable report: An interactive, crosstabulated Excel report that Limited by available
summarizes and analyzes data, such as database records, from various sources, including memory
ones that are external to Excel.) on a sheet
Row (row field: A field that's assigned a row orientation in a PivotTable report. Items Limited by available
associated with a row field are displayed as row labels.) or column fields (column field: A memory
field that's assigned a column orientation in a PivotTable report. Items associated with a
column field are displayed as column labels.) in a PivotTable report
Page fields (page field: A field that's assigned to a page orientation in a PivotTable or 256 (may be limited by
PivotChart report. You can either display a summary of all items in a page field, or available memory)
display one item at a time, which filters out the data for all other items.) in a PivotTable
report
Data fields (data field: A field from a source list, table, or database that contains data that 256
is summarized in a PivotTable report or PivotChart report. A data field usually contains
8
Feature Maximum limit
numeric data, such as statistics or sales amounts.) in a PivotTable report
Calculated item (calculated item: An item within a PivotTable field or PivotChart field Limited by available
that uses a formula you create. Calculated items can perform calculations by using the memory
contents of other items within the same field of the PivotTable report or PivotChart
report.) formulas in a PivotTable report
5) Charting specifications
Feature Maximum limit
Data series (data series: Related data points that are plotted in a chart. Each data 255
series in a chart has a unique color or pattern and is represented in the chart legend.
You can plot one or more data series in a chart. Pie charts have only one data
series.) in one chart
Data points (data points: Individual values that are plotted in a chart. Related data 32,000
points make up a data series. Data points are represented by bars, columns, lines,
slices, dots, and other shapes. These shapes are called data markers.) in a data series
for 2-D charts
Line styles 8
Line weights 4
Pattern and color combinations (color printer) 56,448 (the actual number
depends on your printer and
its software)
Page fields (page field: A field that's assigned to a page orientation in a PivotTable 256 (may be limited by
or PivotChart report. You can either display a summary of all items in a page field, available memory)
or display one item at a time, which filters out the data for all other items.) in a
PivotChart report (PivotChart report: A chart that provides interactive analysis of
data, like a PivotTable report. You can change views of data, see different levels of
detail, or reorganize the chart layout by dragging fields and by showing or hiding
items in fields.)
Data fields (data field: A field from a source list, table, or database that contains 256
data that is summarized in a PivotTable report or PivotChart report. A data field
usually contains numeric data, such as statistics or sales amounts.) in a PivotChart
report
9
3. Overview of Entering Formula
Using a formula can help you analyse data on a worksheet. With a formula you can perform
operations, such as addition, multiplication, and comparison on worksheet values. Use a formula
when you want to enter calculated values on a worksheet.
A formula can include any of the following elements: operators, cell references, values, worksheet
functions, and names. To enter a formula in a worksheet cell, you type a combination of these
elements in the formula bar.
If you begin a formula by pasting a name or function, Microsoft Excel automatically inserts the equal
sign.
3. Type the formula or use any of the following techniques to enter a formula into the formula bar:
Insert references into your formula by selecting cells on your worksheet. When you select cells,
Microsoft Excel inserts relative references in your formula.
--Or--
From the Edit menu, choose Paste to paste characters that you previously copied from another
formula or application.
--Or--
Choose the Function Wizard button on the Standard toolbar or on the formula bar to open the
Function Wizard. Choose the function you want to paste into the formula from the Function Wizard
dialog box.
Note To enter a formula as text, type a single quotation mark before the entry.
The Function Wizard allows you to automate formula creation. You choose from a list of built-in
functions and any custom functions you might have created.
1. To paste a function at the beginning of a formula, select the cell where you want to enter the
formula.
To paste a function elsewhere in the formula, position the insertion point where you want to insert
the function.
10
Microsoft Excel displays the Function Wizard dialog box, listing function types or logical
groupings and the available worksheet functions for each, including custom functions.
3. Select the function category. The All category includes all worksheet functions.
4. Select the function name.
5. Choose the Next button.
The next Function Wizard dialog box appears. The arguments for the function appear next to
boxes you use to fill in the arguments.
If the function has several forms (such as the macro function SELECT), you can choose the
format you need.
You can enter values, references, names, formulas, and other functions into the argument edit
boxes. However, your entries must produce valid values for that argument. When you activate an
argument box, a description of the argument appears in the display area. If an argument is required
for the function to be entered successfully, "required" appears next to the argument name in the
display area.
Between each argument and its argument box is a Function Wizard button. Clicking this button
opens another instance of the Function Wizard, allowing you to nest functions within the
argument. You can nest up to seven levels of functions.
In addition to creating formulas with Function Wizard, you can use it to edit existing formulas that
contain functions.
Shortcut: SHIFT+F3
The first function in the formula is opened in the Function Wizard's Editing mode, allowing you to
modify the arguments.
The SUM function is the most frequently used worksheet function. With it, you can transform a
complex formula such as =A2+A3+A4+A5+A6 into the more concise form =SUM(A2:A6). Even
more convenient is the AutoSum button on the Standard toolbar. Using the AutoSum button,
Microsoft Excel types the function for you and even suggests the range of cells you want to sum.
11
1. Select a cell adjacent to a row or column of numbers you want to add, and choose the AutoSum
button.
Shortcut: ALT+ =
Microsoft Excel enters an equal sign and a SUM function. It will look up and to the left for the
largest contiguous range of numbers to add. It enters this range in the formula and highlights the
reference on the formula bar.
Sum formulas are inserted into all the selected cells simultaneously. You can also select the values
you want to sum before clicking the AutoSum button. Microsoft Excel then adds sum formulas to the
first empty row below the selected range.
To add sum formulas to both rows and columns at the same time, select a range of cells including the
values you want to sum and a blank row and column for the sum formulas.
You can use the AutoSum button to add sum formulas for a selected range containing values along
with rows or columns of subtotals.
1. Select a range of cells, including subtotals, and a blank row or column (or both) adjacent to the
range.
2. Choose the AutoSum button on the Standard toolbar.
Shortcut: ALT+ =
4. Error Messages
4. 1 #Div/0!
The #DIV/0! error value means that a formula is trying to divide by zero.
Using a reference to a blank cell or a cell containing zero as a divisor. (If an operand should be a
number but is blank, Microsoft Excel interprets that blank as zero.)
(Suggested action: Change the reference or enter a nonzero value in the cell used as a divisor).
12
Entering a formula that contains explicit division by 0 (for example, =5/0) (Suggested action: Correct
the formula.)
Writing a macro using a macro function that returns #DIV/0! in certain situations.
(Suggested action: Look up the functions you are using in the Alphabetical List of Worksheet
Functions to see if one or more of your functions returns #DIV/0! in certain situations).
4.2 #N/A!
The #N/A error value stands for "No value is available." This error value can help you make sure you
don't accidentally refer to a blank cell. If there are cells on your worksheet that should contain data,
but the data is not yet available, enter #N/A in those cells. Formulas that refer to those cells return
#N/A instead of calculating a value.
13
4.3 #Value
The #VALUE! error value occurs when you use the wrong type of argument or operand.
4.4 #NAME?
The #NAME? error value occurs when you use a name that Microsoft Excel doesn't recognise.
Misspelling the name. Correct the spelling. Highlight the name in the
formula bar, and then select the name from the
name box at the left end of the formula bar
Misspelling the name of a function. Correct the spelling. Use the Function Wizard
to insert the correct function name into the
formula.
Entering text without double quotation marks in the Enclose the text in the formula in double
formula. Microsoft Excel interprets your entry as a quotation marks.
name even though you intended it as text.
Omitting a colon in a range reference. For example, if Correct the formula, for example,
you enter the formula =SUM (A1D10), Microsoft =SUM(A1:D10).
Excel interprets A1D10 as a name.
4.5 #NULL!
The #NULL! error value occurs if you specify an intersection of two areas that do not intersect.
14
4.6 #NUM!
4.7 #REF!
The #REF! error value occurs when you refer to a cell that is not valid.
5. Entering formulas
If you begin a formula by pasting a name or function, Microsoft Excel automatically inserts the
equal sign.
3. Type the formula or use any of the following techniques to enter a formula into the formula bar:
Insert references into your formula by selecting cells on your worksheet. When you select cells,
Microsoft Excel inserts relative references in your formula.
--Or--
From the Edit menu, choose Paste to paste characters that you previously copied from another
formula or application.
--Or--
15
Choose the Function Wizard button on the Standard toolbar or on the formula bar to open the
Function Wizard. Choose the function you want to paste into the formula from the Function
Wizard dialog box.
Note To enter a formula as text, type a single quotation mark before the entry.
6. Entering data
1. Select the cell or cell range into which you want to enter data.
2. Type the data.
3. Press ENTER.
4. To enter additional numbers in a cell range, repeat steps 2 and 3 for each entry.
Press ENTER to move through a range from top to bottom. Press SHIFT+ENTER to move from
bottom to top, TAB to move from left to right and SHIFT+TAB to move right to left.
Tip You can also make nonadjacent selections and then enter data into the selected cells.
3. Press CTRL+ENTER.
Note Numbers are automatically right aligned; text is automatically left aligned. Microsoft Excel
automatically assigns a built-in number format if it can. You can change the format or create a
custom number format of your own.
1. Select the cell or cell range into which you want to enter a number or a group of numbers.
2. Type the number.
3. Press ENTER.
4. To enter additional numbers in a cell range, repeat steps 2 and 3 for each number.
Note Numbers are right aligned in cells. Microsoft Excel automatically assigns a built-in number
format if it can. You can change the format or create a custom number format of your own.
16
This allows you to use the numeric keypad for entering numbers.
You can now enter numbers without typing the period for the decimal place.
Tip If you are entering currencies, you can use the Currency Style button to format the cells either
before or after typing the entries.
Use the AutoFill feature to create a series of incremental or fixed values on a worksheet by dragging
the fill handle with the mouse. For example, you can copy the value from one cell into the five cells
below it. In this instance, AutoFill works in the same way as the Fill commands on the Edit menu.
You can also drag the fill handle to increment a series or you can use the Series command (Edit
menu, Fill submenu). For example, if you type Monday and Tuesday in consecutive columns, and
then drag the fill handle to the right, Microsoft Excel fills Wednesday, Thursday and so on into the
selected cells.
You can also use the AutoFill shortcut menu commands to copy formatting, formulas, or all cell
contents, or to perform different types of series extensions.
Series are useful when creating table row or column headings on a worksheet, or any time you need
to enter a series of incremental numbers, dates, or time periods.
Use AutoFill to create or increment a small series. Use the Series command (Edit menu, Fill
submenu) to create large series or to specify a series that ends at a certain value.
Just as you can create a series that incrementally increases in value in one direction, you can create a
series that decreases in value in the reverse direction. You do this by dragging the fill handle up or to
the left.
You can clear data within a selection by dragging the fill handle up or to the left of the selection and
stopping within the selected cells (without going past the column or the row border). The data to be
cleared appears in grey as you drag the fill handle.
If you select an entire column or row, the fill handle appears at the lower-right corner of the row or
column heading and not at the end of the selection.
To delete cells, hold down SHIFT while dragging the fill handle into the selection. The pointer
changes to an I-beam, and the data in the rows or columns you drag over turns grey. The cells are
deleted when you release the mouse button.
To shift rows or columns, hold down SHIFT while dragging the fill handle out of the selection. The
pointer changes to an I-beam and the number of rows or columns that you drag over are inserted. The
surrounding rows or columns shift when you release the mouse button.
17
Filling a range of adjacent cells
Caution If you drag the fill handle up or to the left of a selection and stop in the selected cells without
going past the first column or the top row, you will erase your data within the selection.
1. Select the cell or cells you want to copy and the adjacent cells you want to fill.
You can make a nonadjacent selection; in this case, each range in the selection is filled from the
cells in the same range.
2. To copy the selection's first column into the adjacent cells to the right, choose Fill from the Edit
menu, and then choose Right.
To copy the selection's first row into the adjacent cells below, choose Fill from the Edit menu, and
then choose Down.
To copy the selection's last column into the adjacent cells to the left, hold down SHIFT, choose Fill
from the Edit menu, and then choose Left.
To copy the selection's last row into the adjacent cells above, hold down SHIFT, choose Fill from the
Edit menu, and then choose Up.
Any existing values or formulas in the cells you fill will be replaced.
1. Select the first cell you want in your series and enter the starting value.
2. Hold down CTRL and drag the fill handle in the direction you want to fill.
Note If the selected cell contains a value that Microsoft Excel would normally increment, such as a
day or month name, you can prevent incrementing by holding down CTRL. This fills the contents of
the selected cell into the range you drag through without incrementing the value.
18
9.2 To increment a series in two or more cells
1. Select at least two cells and enter at least the first two starting values.
2. Drag the fill handle in the direction you want to fill.
Microsoft Excel guesses at the type of series you want to create by analysing the data type
and incremental changes between cells, and fills in the rest of the selection accordingly.
1. Select a cell or cells that contain numbers or dates you want to increment.
2. Hold down the right mouse button and drag the fill handle in the direction you want to fill.
To create a linear or growth trend series using the AutoFill shortcut menu
1. Select the cell range containing the values on which you want to base your trend.
2. Hold down the right mouse button and drag the fill handle the direction you want to fill.
1. Select the cell range containing the values on which you want to base your trend.
19
2. From the Edit menu, choose Fill, and then choose Series.
3. Under Series In, select the Rows option button or the Columns option button, depending on
your selection.
4. Under Type, select the Linear option button to produce a linear growth trend, or select the
Growth option button to create an exponential growth trend.
5. Select the Trend check box.
6. Choose the OK button.
When you release the mouse button, the rest of the list is automatically entered. Any existing values
or formulas in the cells you fill will be replaced.
Time
A time series can include increments of days, weeks, or months that you specify, or repeating
sequences such as weekdays, month names, or quarters. For example, the initial time selections in the
following table result in the series shown.
20
Jan, Apr Jul, Oct, Jan
15-Jan, 15-Apr 15-Jul, 15-Oct
1991, 1992 1993, 1994, 1995
Q2 Q3, Q4, Q1
Qtr2 Qtr3, Qtr4, Qtr1
Linear
When you create a linear series, Microsoft Excel increases or decreases values by a constant value as
shown in the following table.
1, 2 3, 4, 5
1, 3 5, 7, 9
100, 95 90, 85
Growth
When you create a growth series, Microsoft Excel multiplies values by a constant factor as shown in
the following table.
2 (step value 2) 4, 8, 16
2 (step value 3) 6, 18, 54
AutoFill
This extends several types of data. The AutoFill feature logically repeats some series, for example,
Qtr3, Qtr4, Qtr1. You can use the AutoFill feature directly on your worksheet by dragging, or with
the Series command (Edit menu, Fill submenu) as shown in the following table.
Note Data plotted in a chart is referred to as a data series. Chart data series are not related to the
series created using the Series command on the Data menu or the fill handle. For more information
about chart data series, see Creating a Chart.
21
The intersection operator, a space, is used to refer to a cell that two intersecting cell ranges share in
common. For example, in row 3, the range B3:M3 contains sales figures, and in column C, the range
C2:C8 contains various data for February. The formula =B3:M3 C2:C8 uses the intersection operator
to refer to the value at the intersection of the two ranges, cell C3.
Names make intersection easier to use. For example, if you define the name Sales as the range B3:M3
and the name February as the range C2:C8, the formula =February Sales produces the same result as
the previous example, cell C3.
Implicit Intersection
In a formula, if you specify a reference to a row or column of cells that should be a reference to a
single cell, Microsoft Excel chooses just one cell from that reference on which to perform the
operation. For example, if you enter the formula =Sales*15% in cell C10, Microsoft Excel looks for a
cell in the same row or column that fits the description given in the formula. In this case, the named
range Sales (B3:M3) includes a cell in column C, the same column as the formula. Therefore, the cell
used in the formula is C3. Moreover, the complete intersection statement is not necessary. If you
copy the formula to the right, each new formula uses a cell in the range Sales that is in the same
column as the copied formula.
You can change the location of cells on a worksheet by copying or moving cells to a different part of
the same worksheet, to another worksheet, or to another application.
When you copy a cell, you duplicate the cell contents and paste them in a new location. When you
move cells, you remove the cells and their contents from the current location, and paste them in a new
location. You can insert the cells you are copying or moving between existing cells, or you can paste
cells over existing cells.
There are several ways to copy or move cells. Use the Cut, Copy, and Paste commands, toolbar
buttons, or shortcut keys if you are copying or moving cells within a large worksheet, to a different
sheet within a workbook, or to another window or application. These methods use the Clipboard.
If you are copying or moving across short distances on a worksheet, you can use the mouse to copy
and move cells.
22
If you choose Paste from the Edit menu or click the Paste button instead of pressing ENTER,
you can then repeat steps 3 and 4 to paste the data in additional locations.
To insert the copied cells and shift the existing cells to accommodate the inserted cells,
choose Copied Cells from the Insert menu.
5. If the moving border is still visible, cancel it by pressing ESC or choosing another command.
If you are copying cells a short distance within a worksheet, you can use the mouse.
While you drag, a border appears to indicate the size and position of the selection.
If the paste area is located beyond the visible portion of the worksheet, drag the selection to
the edge of the window to scroll through the worksheet.
4. To copy the data to existing cells, position the border so that it surrounds the paste area, and
then release the mouse button. Any existing data in the paste area is replaced.
To insert the copied data between existing cells, press CTRL+SHIFT while dragging the selection to
where you want to insert it. Existing cells shift to make room for the copied cells.
CTRL+X
If you want to move the cells to another sheet or workbook, switch to the other sheet or
workbook.
3. Select the upper-left cell of the paste area or select the entire paste area.
CTRL+V
To insert cells containing the moved data between existing cells, choose Cut Cells from the Insert
menu. Existing cells are shifted to make room for the moved cells.
23
If you are moving cells a short distance within a worksheet, you can use the mouse.
While you drag, a border appears to indicate the size and position of the selection.
If the paste area is located beyond the visible portion of the worksheet, drag the selection to
the edge of the window to scroll through the worksheet.
4. To move the data to existing cells, position the border so that it surrounds the paste area, and
then release the mouse button. Any existing data in the paste area is replaced.
To insert cells containing the moved data between existing cells, hold down SHIFT as you position
the mouse pointer over the border. Drag the border to a new location and release the mouse button.
Existing cells and data are shifted to make room for the new cells.
CTRL+C
3. To paste the same cells in several places on your worksheet, select the upper-left cell of each
paste area.
You can select nonadjacent cells by holding down the CTRL key as you select them.
4. From the Edit menu or the shortcut menu, choose Paste.
5. To paste the same copy area again, repeat steps 3 and 4.
6. To cancel the moving border after you have finished copying, press ESC or choose another
command.
1. Select the cell containing the formula or value you want to copy.
2. From the Edit menu or the shortcut menu, choose Copy.
Selecting a single cell is easiest, because it may be difficult to determine the size and shape of
the transposed copy area. The area of the selected cells and the range where you want to paste
cannot overlap.
4. From the Edit menu, choose Paste Special.
5. To combine the copied cells' formulas with the paste area cells, select the Formulas option
button.
24
To combine the copied cells' values with the paste area cells, select the Values option button.
6. Under Operation, select the operation you want used to combine each copied cell and its
corresponding paste area cell.
If you select the Divide option button, Microsoft Excel divides the paste area cell value or
formula by the copied cell value or formula. If you select the Subtract option button,
Microsoft Excel subtracts the copied cell value or formula from the paste area cell value or
formula.
7. Choose the OK button.
Note When combining data from more than one worksheet, you can also use the procedures for
linking and consolidating data between worksheets.
Tip If you want to increase a range of numbers by a certain percentage, multiply the value of a single
cell containing the percentage and paste it to a range.
CTRL+C
3. Select the upper-left cell of the paste area or select the entire paste area.
4. From the Edit menu, choose Paste Special.
5. Under Paste, select the Formulas option button.
6. Choose the OK button.
CTRL+C
3. Select the upper-left cell of the paste area or select the entire paste area.
4. From the Edit menu, choose Paste Special.
5. Under Paste, select the Values option button.
6. Choose the OK button.
If you want to change width for all columns on the worksheet, click the Select All button.
25
2. Drag the border to the right of a column heading until the column is the width you want.
The width measurement is displayed at the left end of the formula bar.
Alternate Method
You can also choose Column Width from the shortcut menu if a column was selected.
3. Type a number in the Column Width box.
This number represents the number of characters that can be displayed in a cell for the
standard font.
4. Choose the OK button.
If you want to change width for all columns on the worksheet, click the Select All button.
2. Double-click the border to the right of a column heading.
The column width adjusts to accommodate the longest cell entry in the column.
Alternate Method
If you want to reset all columns on the worksheet to the standard width, click the Select All
button.
2. From the Format menu, choose Column, and then choose Standard Width.
3. Choose the OK button.
If you want to change the standard column width on all worksheets in a workbook, first select all
worksheets.
1. From the Format menu, choose Column, and then choose Standard Width.
2. In the Standard Width box, type a new number.
This number represents the number of characters that can be displayed in a cell for the
standard font.
26
3. Choose the OK button.
Note Only columns that have not been adjusted will accept the new standard width.
If you want to change height for all rows on the worksheet, click the Select All button.
2. Drag the border below a row heading until the row is the height you want.
The height measurement is displayed at the left end of the formula bar.
Alternate Method
You can also choose Row Height from the shortcut menu if a row was selected.
3. Type a number in the Row Height box.
4. Choose the OK button.
If you want to change height for all rows on the worksheet, click the Select All button.
2. Double-click the border below a row heading.
Alternate Method
27
16. Worksheet data
You can change the alignment of numbers and characters in a cell. The contents of cells can be
aligned left, right, or centred. In a new worksheet, all cells have the General format, which
automatically aligns numbers to the right, text to the left, and logical and error values centred.
You can also centre an entry across a selection of cells. For tall cells, you can specify a vertical
alignment (top, centre, or bottom). Alignment also includes the orientation of the characters
sideways.
For text, you can also wrap the text and justify it (align the text both right and left) within the cell.
Text can also be entered into text boxes and then manipulated as a graphic object.
Alternate Method
If you have a long cell entry that you want displayed on multiple lines in a single cell, select
the Wrap Text check box. Microsoft Excel will automatically increase the row height to
accommodate all of the text in the cell.
5. Choose the OK button.
1. Select the cell that contains the data you want centred across a range of cells.
2. Extend your selection to include only adjacent blank cells to the right.
3. Click the Centre Across Columns button.
The text is displayed centred across all the selected blank cells and will change with any column
width adjustments.
Alternate Method
1. Select the cell that contains the data you want centred across a range of cells.
2. Extend your selection to include only adjacent blank cells to the right.
3. From the Format menu, choose Cells.
4. Select the Alignment tab.
28
5. Under Horizontal, select the Centre Across Selection option button.
6. Choose the OK button.
1. Select the cells in which you want the text to wrap. Overview of Formatting
2. From the Format menu, choose Cells.
3. Select the Alignment tab.
4. Select the Wrap Text box.
5. Choose the OK button.
Tip If you adjust the column width after wrapping text, you can quickly adjust the row height by
double-clicking the line below the row heading.
You can put borders around cells and format the cells with patterns and colours. Cell borders can be
any combination of horizontal and vertical lines on the left, right, top, or bottom of a cell.
Cells appear to share their borders. Putting a bottom border on one cell produces the same effect as
putting a top border on the cell below it. However, a border prints only with the cell it is applied to.
By hiding the gridlines on a worksheet, you can make formats such as borders, double underlining,
and patterns stand out. To hide gridlines when you display or print a worksheet, choose Options from
the Tools menu, select the View tab, and clear the Gridlines check box. To hide gridlines only when
you print a worksheet, choose Page Set-up from the File menu, and clear the Gridlines check box in
the Sheet tab.
If you want to place a single or double underline beneath characters in a cell, see Underlining cell
contents.
You can apply the selected border style to other cells by making a selection and then clicking the
style on the Borders button.
Tip If you want to keep the palette displayed so you can apply different border styles to several
selections, drag the palette off the toolbar.
Alternate Method
You can also choose Format Cells from the shortcut menu.
3. Select the Border tab.
29
4. Select the border options you want.
5. Choose the OK button.
A chart is a graphic representation of worksheet data. Charts can make data interesting, attractive,
and easy to read and evaluate. They can also help you analyse and compare data.
When you create a chart based on a worksheet selection, Microsoft Excel uses the values from the
worksheet and presents them in the chart as data points, which are represented by bars, lines,
columns, slices, dots, and other shapes. These shapes are referred to as data markers.
Groups of data points, or data markers, originating from single worksheet rows or columns are
grouped in data series. Each data series is then distinguished by a unique colour or pattern, or both.
After creating a chart, you can enhance it and emphasise certain information by adding chart items,
such as data labels, a legend, titles, text, trendlines, error bars, and gridlines. Most chart items can be
moved and sized. You can also format these items using patterns, colours, alignment, fonts, and other
formatting attributes.
With the ChartWizard, you can quickly accomplish many tasks that would otherwise take much
longer to complete.
When creating a chart with the ChartWizard, you can specify the worksheet range, select a chart type
and format, and specify how you want your data to be plotted. You can also add a legend, a chart
title, and a title to each axis.
When modifying an existing chart, you can specify a different worksheet range and change the
orientation of your chart--that is, whether the data series are in rows or columns on the worksheet.
There are two commands and two buttons that start the ChartWizard. The command you choose or
the button you click will create either an embedded chart or a chart sheet.
To create an embedded chart, use either the ChartWizard button or the On This Sheet command
(Insert menu, Chart submenu).
To create a chart sheet, use the As New Sheet command (Insert menu, Chart submenu) or the Insert
Chart Sheet button, once you've added it to a toolbar.
When you create a chart sheet, Microsoft Excel places the chart on the new chart sheet, which is then
inserted into your workbook to the left of the worksheet that the chart is based on. By default, chart
sheet tabs are named Chart1, Chart2, and so on.
30
To create a chart sheet with the ChartWizard
1. In the worksheet, select the data you want to plot, including cells containing any category or
series names that you want to use in the chart.
2. From the Insert menu, choose Chart, and then choose As New Sheet.
3. Follow the instructions in the ChartWizard.
4. To move between steps, choose the Next button or the Back button.
5. Choose the Finish button during any of the steps, and the ChartWizard will finish the chart
for you.
Tip To give your chart sheet a different tab name, use the Rename command (Format menu, Sheet
submenu), and type the name you want.
1. In the worksheet, select the data you want to plot, including cells containing any category or
series names that you want to use in the chart.
2. Press F11.
Note If Microsoft Excel cannot determine how to create a chart using the worksheet data you
selected, the ChartWizard will request more information from you.
You can add a chart title or axis titles to a chart. For 3-D charts, you can also add an axis title to the
series axis.
You can also choose Insert Titles from the shortcut menu.
3. To add a chart title, select the Chart Title check box.
To add one or more axis titles, select the check boxes you want.
4. Choose the OK button.
You can add data labels to a data series, to an individual data point, or to all data points in the chart.
The chart type assigned to your selected data points determines which kind of labels you can display.
31
2. Select the data series or the single data marker you want to add labels to.
To apply labels to all data points, do not select any data markers.
3. From the Insert menu, choose Data Labels.
You can also choose Insert Data Labels from the shortcut menu.
4. Select the kind of labels you want displayed.
5. Choose the OK button.
When axes are displayed in your chart, you can add major, minor, vertical, or horizontal gridlines to
the chart, or any combination of these.
3. For each axis, select the appropriate check boxes for the gridlines you want displayed.
To remove gridlines, clear the check boxes for the gridlines you don't want displayed.
4. Choose the OK button.
You can delete data labels for a data series, a data point, or the entire chart. You can also delete a
chart title, an axis title, the entire legend, a single legend entry and its key, or any type of gridline.
Shortcut: DEL
Note To add or remove the legend to or from your chart, you can also click the Legend button. To
turn major horizontal gridlines on or off, click the Horizontal Gridlines button.
32