Microsoft Excel ("The End of The Begning")
Microsoft Excel ("The End of The Begning")
MICROSOFT EXCEL
(“THE END OF THE BEGNING”)
TABLE OF CONTENTS
8) Printing........................................................................................... ................10
23) Vlookup.........................................................................................................23
27) Macros..........................................................................................................41
1) Basic Terms and Parts of the Screen
Workbook- term used to describe an entire Excel file.
Worksheet- (or just Sheet): the individual page within each workbook.
Each workbook starts out with 3 sheets.
Can add up to 255 sheets.
The tab of the active sheet is bold.
Formula bar
Range Column
Name Header
Row
Header
Active
sheet in
workbook
Sheet and
Name Data
tabs Region
Range name box- lists the address of the cell currently selected.
Formula bar- When you enter information into a cell, anything you type appears in the Formula bar. You
can edit text in this bar or in the cell itself. This is also where you enter mathematical formulas.
Each worksheet is made up of columns (vertical sections) and rows (horizontal sections).
The point where the rows and columns intersect is a cell (the little squares).
Cells are identified with a letter and a number that refer to the column and row where it is located—this is
the cell’s address. For example the cell address A1 refers to the intersection of column A and row 1 and the
cell address C6 refers to the intersection of column C and row 6.
Sheet name tabs are shown along the bottom for each sheet within the workbook. This allows you access
different sheets within a workbook.
The Data Region is the area of a worksheet that contains data (as opposed to headings, etc.)
To Insert Columns
Select the column that is to the right of where you want the new column inserted. (Columns are inserted to
the left of the selected column.)
Click Insert on the Menu bar, and then click Columns.
To Insert Rows
Select the row that is under where you want the new row inserted. (Rows are inserted above the selected
row.)
Click Insert on the Menu bar, and then click Rows.
To Insert Worksheets
Click Insert on the Menu bar, and then click Worksheet.
It may then be necessary to rearrange the order of the sheets. To rearrange the sheets, simply drag the
appropriate sheet to its new location.
To Delete Columns
Select the column to be deleted by clicking the appropriate column header button.
Press the Delete key on the keyboard.
To Delete Rows
Select the row to be deleted by clicking the appropriate row header button.
Press the Delete key on the keyboard.
To Delete Worksheets
Select the sheet to be deleted by clicking the appropriate sheet tab.
Click Edit on the Menu bar then click Delete Sheet.
Click OK to confirm the deletion.
Be careful when deleting rows, columns, or worksheets because you will delete all data stored in those
locations.
Manual
Calculations
To manually calculate values means using some of the standard mathematical operators and not the built-in
functions. For instance, using the figure on page 5, if I wanted to find the sum of all four quizzes and the
final exam, I could enter the following formula in cell H3:
=C3+D3+E3+F3+G3
This would add the values stored in the cells listed in the formula and store the result in cell H3. Once the
formula is created, press Enter to actually execute the formula.
Manual calculation formulas work fine for entering a basic formula, but can get labor intensive. Instead, you
can use a function to make the job easier.
Functions
A function is a prewritten named formula that takes a value, performs an operation and returns a value. To
use built-in function in a formula, type the equal sign in the cell where you wish to store the resulting value,
type the name of the function, and then type the argument in parenthesis. The argument is what identifies
the range of cells to be included in your formula.
For instance, instead of typing the formula:
=C3+D3+E3+F3+G3
You can use the built-in Sum function to build a formula. To find the sum of all four quizzes and the final
exam, I could insert the following formula in cell H3:
=SUM(C3:G3)
This would add the values stored in the range of cells listed in the formula and store the result in cell H3.
Once the formula is created, press Enter to actually execute the formula.
AutoSum
button
Excel will put a dotted line around the cells it thinks you want to add. If that is correct, just press the Enter
key on the keyboard. If not, then edit the cell addresses in the formula bar then press the Enter key on the
keyboard.
Copying Formulas
All of the instructions for creating a formula involve placing that formula into ONE cell. Often, a formula
can be used basically unchanged in more than one cell. A formula can be copied to other cells and used
effectively by only changing some of the cell references or addresses used in that formula. For instance,
going back to earlier examples, if I wanted to place a formula to calculate the sum of cells C4 through G4 in
cell H4 and I already had a formula stored in cell H3 that calculates the sum of cells C3 through G4 then I
could use Excel’s AutoFill feature to copy the formula to other locations.
AutoFill is a command you can use when you want to copy the same formula across a range of adjacent
cells. AutoFill will automatically change cell addresses depending on where the new formula is being
copied. In this example, I am only copying the formula in cell H3 down one row to Row 4. AutoFill would
automatically change the cell addresses in the formula to reflect the move to row 4. AutoFill would just add
1 to the current row references in the formula and leave the column portion of the reference untouched. If I
were copying the formula down many rows, AutoFill would just keep updating the row references. This
would also apply if I were copying the formula to different columns or to a combination of different rows
and columns.
To Use AutoFill
Click on cell that has the formula you want to select it.
Move the mouse pointer to the bottom right corner of the cell. Place the mouse pointer on the dark square
found in the corner. You will know when you are there because a solid black cross will appear instead of
your pointer.
Then hold down your left mouse button and drag your pointer across the cells you want to AutoFill. As you
drag across, you will see a dotted line appear around the cells.
Once you’ve highlighted the cells you want to AutoFill, release your mouse button. The totals will fill in.
When you use the AutoFill feature, Excel is adapting the formula to the new Relative position for each cell
address.
Excel recognizes two types of cell references when it is creating a formula: Relative and Absolute. A Relative
Reference is a type of cell reference we have been working with up to this point. It means that if you copy or
move a formula from one cell to another, Excel modifies the formula automatically for the new position. An
Absolute Reference is a type of cell reference that means if you copy or move the formula to another cell, the
cell reference will not change. You can use an absolute reference to keep both the row and column in a cell
address from changing or you can break it up and keep either the row or the column from changing.
Absolute references are good to use when you have a formula value that will only be changed occasionally
and is used in several formulas. For instance, if you usually have 1000 possible points in your grading scale,
you would want to store the 1000 in a cell and use an absolute reference to it in all your formulas that
calculate the average using the 1000 possible points. That way, if you ever change the possible points to
something say 1050 then you will only need to change the value in the one cell instead of in several formulas.
To Create an Absolute Reference
To create an absolute reference in a formula, type a $ before the letter (column reference) and/or the number
(row reference) in the cell’s address for example $F$5 or $C6 or G$7.
8) Printing
To Print a Selection
Highlight everything in your spreadsheet you want to
print. This includes your title, headings, data field and
charts.
Click File on the Menu bar then click Print.
Select the Selection radio button in the Print what
section.
Click OK.
To Print a Sheet
Make sure you are viewing the sheet you wish to print.
Click File on the Menu bar then click Print.
Select the Active sheet(s) radio button in the Print
what section.
Click OK.
Click the Close button on the Print Preview toolbar to exit Print Preview.
Many a times, one wants to refer to two different sections of a worksheet. For example,
in case of a long list, the headings might scroll up. In that event, one can consider to split
the window into two parts. One can position the cell pointer to the cell where one desires
a split and choose the command Split from the Window Menu.
To remove the split choose Window>Unsplit.
While the movement of the split windows is synchronized, none of them is fixed.
Therefore, it is possible to loose track of the titles if the mouse movements are not
properly handled. To avoid such a
situation, one can choose Window-
>Freeze Panes.
To reverse the process, choose
Window->Unfreeze Panes.
AutoFill is an in-built feature whereby one can fill up a particular range of cells based on
some pre-determined series. For example, if one cell contains January and the next one
contains February, one can just use the fill handle to automatically complete the entire
range with the month names. One can create custom lists pertaining to one’s organization.
12) Data Validation
At times, there may be a need to restrict the content that is being typed into a particular
cell. For example, one may want the residential status to be either “Resident” or
“Resident but Not Ordinarily Resident” or “Non Resident”. In such a case, the entry into
a particular cell can be validated through the “Data Validation” Feature. The steps for
data validation feature are explained below:
1. Select the cell/range for which validation is to be applied
2. Choose Data -> Validation from the menu. The following screen appears
The ideal way to total a particular range of numbers is therefore to use the SUM()
function. The standard usage of the SUM function has already been considered. Of
importance to note is the fact that one can total multiple non-contiguous ranges using a
single SUM function. Just separate the range addresses by a comma. One can also use
range names instead of the cell attributes to make the function more meaningful for the
users.
Quick Sum
Many a times, one just wants to refer to the total of a particular range of cells. For this
purpose, one need not insert the SUM function and delete it thereafter. MS-EXCEL
presents built-in totals on selection of a range at the status bar which appears at the
bottom of the sheet. Even the Quicksum feature can be customized to show either the
total or the maximum, minimum, average, count, numeric counts and so on. To customize
the Quicksum feature, right click at the place where the sum is displayed and the
following options appear:
Sub Total
In case there are nested totals, the SUM function can create havoc as there would be
multiple totals. In such a situation one can consider the use of SUBTOTAL() function.
This function avoids the cascading effect of the SUM function by recognizing the multilayered
totaling feature. Accordingly, a subtotal function ignores the value of another
subtotal function in the selected range of cells. The subtotal function is not restricted
merely to the summation but can also be used for counts, etc. Accordingly, the
SUBTOTAL() Function requires an additional argument which is the function number.
The various function numbers and the action performed by them are tabulated below:
Accordingly, to get a subtotal of the cells in A2 to A9, one will use the function
=SUBTOTAL(9,A2:A9)
14) Sort
In case a list of data is typed, one may need the data arranged in a particular fashion. For
example, you may want your client details either alphabetically or based on the client
codes. This is where sorting is useful and the same is very simple. Choose the relevant
command from the Data Menu and the Sort Wizard takes you through the rest of the
process. Remember, sorted data is always advantageous from three counts: firstly, it
improves readability, secondly, it permits effective lookups and lastly, it lays down the
foundation for data grouping and sub-totaling.
Sorting is a permanent process as compared to filtering which is a temporary process
Choose any cell in the data range and Select Data -> Sort
Choose successive sort keys and sort order
On a brief review of the above screen, one understands that the sort function permits
sorting only upto three levels of data. If sorting is required for multiple levels of data,
then one will have to use the sort function more than once. Sort first based on keys of
least significance and move to keys of higher significance.
15) Sub-Totals
At times, there is a need to not only have grand totals but also subtotals – would you not
like to have group-wise outstanding as well as total outstanding? For this purpose, one
can use the Subtotals Function in the Data Menu. The Function is versatile and permits to
have multiple levels of subtotals (for having such multiple levels, do not replace the
current subtotals). Only care required is to sort the list in the same order of subtotaling
before using the subtotals command otherwise you might end up in a mess. One can also
consider the use of page-break option if you want individual reports for individual
groups. And if things appear messy, just remove all subtotals and Start Afresh!
To subtotal data in a spreadsheet follow these steps:
1. Decide upon the column you wish to use for the subtotal.
2. Sort the data using the criterion you selected in step 1.
3. Select Data/Subtotal. Complete the subtotal window that appears and click
OK.
4. Subtotals will now appear in the spreadsheet. Subtotals can be isolated from
raw data using the gray view bar to the left. Clicking the (-) boxes will reduce
data, clicking the (+) box will restore data.
5. Clicking the small 1,2,3, boxes in the upper left corner will reduce or expand
all categories of data simultaneously.
6. To remove subtotals select Data/Subtotal and click on the “Remove All”
button.
In case of multiple records and large databases, there may be a need to restrict the report
to certain types of transactions. For example, if you are maintaining your sale details in
MS-EXCEL, you may be interested in a quick list of all the sales made to a particular
customer. This requirement is known as a query. Again, Excel has an excel-lent (!)
feature to do this. One just needs to use it to believe it. Yes, we are talking of AutoFilter –
the feature which displays a subset of data without actually sorting or moving data. Once
you select the AutoFilter command from the Data Menu, Excel inserts drop down arrows
next to column headings in the list. Selecting an item from a drop down list hides all rows
except rows that contain the selected value. One can edit and format the cells which are
visible.
Choose any cell in the data range and Select Data -> Filter -> AutoFilter
Use the drop down lists to specify criteria. Criteria can be
1. Particular Value
2. Top/Bottom (no of items) in terms of value or percentage
The filtered data can also be copied into another area by the simple process of copy-paste.
One limitation of AutoFilter is that one can have multiple alternative criteria (OR
condition to be more specific) for a single field, one can also have cumulative multiple
criteria (AND condition) across multiple fields but one cannot have alternative multiple
criteria across various fields. To cover such complex searches, one has to take recourse to
the Advanced Filter Option. Here, one specifies the conditions in a separate range known
as the criterion range. The results can be filtered in the original list or in another range of
cells.
Useful for specifying criteria which are alternative in nature (OR) condition
Make use of a “criteria range”
Select Data -> Filter -> Advanced Filter
The filtered data may be copied to another range for subsequent analysis
Revert back to original data by choosing Data -> Filter -> Show All
The Advanced Filter can also be used to delete duplicate records in Microsoft Excel. For
this one needs to filter for unique records and then use the resulting rows to overwrite the
source cells. The entire procedure is summarized in the table given below:
1. In the list you want to filter, select the column or click a cell.
2. On the Data menu, point to Filter, and then click Advanced Filter.
3. In the Advanced Filter dialog box, click Copy to another location.
4. In the Copy to box, type a cell reference.
5. Select the Unique records only check box, and then click OK.
6. Select the data returned by the filter, and then click Cut on the toolbar.
7. Select the source data, and then click Paste on the toolbar.
Function Description
Concatenate Joins several text strings into one text string.
Exact Checks whether 2 strings are exactly the same and
returns True or False. (Its case sensitive)
Dollar Converts a number to text, using currency format.
Left Returns the specified number of characters from
the start of a text string.
Right Returns the specified number of characters from
the end of a text string.
Mid Returns the characters from the middle of a text
string, given a starting position and length.
Upper Converts a text string to all uppercase letters.
Lower Converts a text string to all lowercase letters.
Len Returns the number of characters in a text string.
Proper Converts a text string to proper case, the first letter
in each word in uppercase and all other in
lowercase.
Replace Replaces part of a text string with a different text
string.
Rept Repeats text a given number of times.
Trim Removes all spaces from a text string except for a
single space between the words.
We will start each description with what the function does, followed by its syntax and then the number of
arguments it can accept. It is important to note that while some functions take more than one argument it is
not always the case that they must all be supplied.
These arguments are known as option arguments and I will identify these in the syntax description by not
bolding the argument. For example the SUM function can take up to 30 arguments, but only one of the thirty
needs to be supplied, so I would show this as below, eg:
Syntax SUM(number1,number2,...) Meaning “number2,…. to number 30” are all optional arguments while
“number1” must be supplied.
AVERAGE
The AVERAGE function is used to return the average of the arguments supplied.
Syntax
AVERAGE(number1,number2, ...)
The AVERAGE function can take up to 30 arguments.
The arguments supplied must be numeric or references to numeric values. Text and/or references to text are
ignored. It is important to note that cells containing zeros are NOT ignored. This can give you unexpected
results if you are not aware of it.
=AVERAGE(A1:A3) would equal 10 if A1:A3 contained 5, 10, 15 respectively
COUNT
COUNTA
COUNTBLANK
The COUNTBLANK function is used to count empty cells. It is the opposite of the COUNTA function
Syntax
COUNTBLANK(range)
The COUNTBLANK function takes 1 argument and this argument should be a reference to a range. Cells
within the range can be a variety of data types, but only empty cells are counted
=COUNTBLANK(A1:A5) would equal 1 if cells A1:A5 contained , 12/12/2001, house, 0, dog
In other words A1 is empty and so is counted while all other cells are not.
COUNTIF
The COUNTIF function is used to count cells within a range that meet a specified criterion.
Syntax
COUNTIF(range,criteria)
The COUNTIF function takes two (2) arguments. The range argument is a reference to a range of cells, while
the criteria argument is the criterion that should be met by the cells within range before they are counted.
The criteria specified can be in the form of a number, text or an expression.
Number criteria
=COUNTIF(A1:A5,20) would equal 1 if cells A1:A5 contained 15, 22, 20, 0, dog
In other words A3 is the only cell that meets the criteria of 20
Text criteria
=COUNTIF(A1:A5,”dog”) would equal 1 if cells A1:A5 contained 15, 22, 20, 0, dog
In other words A5 is the only cell that meets the criteria of “dog”
Expression criteria
=COUNTIF(A1:A5,”<20”) would equal 2 if cells A1:A5 contained 15, 22, 20, 0, dog.
In other words A1 and A4 are the only cells that meets the criteria of “<20”.
MAX
The MAX function is used to return the largest number from a set of values.
Syntax
MAX(number1,number2,...)
The MAX function takes up to 30 arguments and will ignore text.
=MAX(A1:A5) would equal 10 if cells A1:A5 contained 9, 8, house, 10, -10
MIN
Opposite to Max, the MIN function is used to return the smallest number from a set of values.
Syntax
MIN(number1,number2,...)
The MIN function takes up to 30 arguments and will ignore text.
=MIN(A1:A5) would equal 1 if cells A1:A5 contained 9, 8, house, 10, 1.
SUMIF
The SUMIF function is used to return the sum value from a specified range that meets a criterion.
Syntax
SUMIF(range,criteria,sum_range)
The SUMIF takes up to 3 arguments. The range is the range of cells to evaluate to see if they meet the
specified criteria. The criteria specified can be in the form of a number, text or an expression. The sum_range
is the range of cells to sum, but only if the corresponding cells in the range meet the specified criteria. If
sum_range is omitted then the cells within the range are summed.
=SUMIF(A1:A5,5) would equal 10 if cells A1:A5 contained 5, 8, house, 10, 5
In other words cells A1 and A5 would be summed as they meet the criteria and NO sum_range was
supplied.
=SUMIF(A1:A5,5,B1:B5) would equal 20 if cells A1:A5 contained 5, 8, 1, 9, 5 and cells B1:B5 contained
10,1,3,8,10.
In other words cells B1 and B5 would be summed as the corresponding cells in A1:A5 have a value of 5.
=SUMIF(A1:A5,”Cat”,B1:B5) would equal 15 if cells A1:A5 contained Cat, cat, Cat, 9, 5 and cells B1:B5
contained 5,5,5,8,11
In other words cells B1,B2 and B3 would be summed as the corresponding cells in A1:A5 contain the text
“Cat” (not case sensitive).
=SUMIF(A1:A5,”>5”) would equal 34 if cells A1:A5 contained 10, 15, Cat, 9, 5 and In other words cells A1
and A5 would be summed as they meet the criteria of being greater than 5.
Conditional formatting permits the user to apply special formatting settings that take
effect when the contents of the cell meet specified conditions. For instance, if there is a
loss under a particular head, you intend to color it red so that it immediately catches
your attention. Similarly, you may like to color your balance sheet totals to blue if they
do not tally. One very practical tip is to combine the ISERROR function with the
Conditional Formatting feature to hide errors. What is effectively done is that the font
and the background is set to the same color if the cell contains an error.
Select the range of cells for which the formatting is desired
Choose Format -> Conditional Formatting
Allows different forms of formatting based on the cell contents
Maximum of 3 different conditions can be specified
To suppress errors, choose Formula is =ISERROR() and then choose same color
font as the background color
For creating a PivotTable, choose the PivotTable command from the Data menu. The
PivotTable wizard appears and takes you through the process of creating a PivotTable
Step1: Specify the Data Source: Here we specify either an existing Excel list or an
external source of data. We also specify whether we want to create a PivotTable or a
PivotChart report. The default choices are generally Excel list and PivotTable. Choose
Next to specify the data range.
Step 2: Define the Data Range: Ensure that the correct range of cells has been included.
Click the next button to specify the location of the PivotTable
Step 3: Click on Layout. At this stage, it is necessary to understand certain terms relevant for the purposes of
PivotTables. For effective analysis, PivotTable uses the concepts of row & column fields
for summarizing and grouping data. The page field could be used to filter out the data on
a particular item. The data field contains the summary information. To create the
analysis, drag the desired item from the PivotTable Field list and drop it in the relevant
section of the main table.
23) Vlookup
In Excel, the VLookup function searches for value in the left-most column of table_array and returns the
value in the same row based on the index_number.
The syntax for the VLookup function is:
VLookup( value, table_array, index_number, not_exact_match )
value is the value to search for in the first column of the table_array.
table_array is two or more columns of data that is sorted in ascending order.
index_number is the
column number in
table_array from which
the matching value must
be returned. The first column is 1.
not_exact_match determines if you are looking for an exact match based on value. Enter FALSE to find an
exact match. Enter TRUE to find an approximate match, which means that if an exact match if not found,
then the VLookup function will look for the next largest value that is less than value.
Note:
If index_number is less than 1, the VLookup function will return #VALUE!.
If index_number is greater than the number of columns in table_array, the VLookup function will return
#REF!.
If you enter FALSE for the not_exact_match parameter and no exact match is found, then the VLookup
function will return #N/A.
To perform mathematical operations on your VLookup results, you need to replace the #N/A error with a 0
value (or something similar). This can be done with a formula that utilizes a combination of the VLookup
function, IF function, and ISNA function.
If the VLookup function does not find an exact match, it will return the #N/A error. By using the IF and
ISNA functions, you can return a "Yes" value if an exact match is found. Otherwise, a "No" value is returned.
It searches for value in the top row of table_array and returns the value in the same column based on the
index_number.
The syntax for the HLookup function is:
HLookup( value, table_array, index_number, not_exact_match )
value is the value to search for in the first row of the table_array.
table_array is two or more rows of data that is sorted in ascending order.
index_number is the row number in table_array from which the matching value must be returned. The first
row is 1.
not_exact_match determines if you are looking for an exact match based on value. Enter FALSE to find an
exact match. Enter FALSE to find an approximate match, which means that if an exact match if not found,
then the HLookup function will look for the next largest value that is less than value.
Note:
If index_number is less than 1, the HLookup function will return #VALUE!.
If index_number is greater than the number of columns in table_array, the HLookup function will return
#REF!.
If you enter FALSE for the not_exact_match parameter and no exact match is found, then the HLookup
function will return #N/A.
For example:
Let's take a look at an example:
What is a Chart?
A chart is a graphic representation of worksheet data. Presenting information in the form of a chart is often
one of the best ways to analyze data as well as call attention to specific entries.
With Excel, you can create several different types of charts. Each type, in turn, can be displayed in a number
of different subtypes. Some of the most common chart types include:
Scatter In a Scatter chart, two sets of values are represented by points (usually on two lines).
With Excel’s Chart Wizard, you can quickly plot a basic chart—that is, a chart containing data markers, a title
and a legend. The chart can appear on the worksheet containing the source data or it can appear on a
separate chart sheet of its own.
Highlight the data you want to chart, including any headers or labels
Click the Chart Wizard button on the Standard toolbar Chart Wizard button
From the Chart type list, click type of chart you wish to create
From the Chart sub-type list, click the sub-type you wish to use
Click the Next button
Objective 2: The Chart Source Dialog box.
Lets you choose the data being charted and whether the series
are in rows or columns. If you selected the data before clicking
the Chart Wizard button, Excel converted the range to absolute
values and the correct range displays in the Data range text box.
Note: By selecting the Series tab, you can change the title of
Default Series to specific series names
This dialog box shows a sample chart using the data you
selected. Here, you can choose to keep the legend, add a chart title, gridlines, data labels, data table, and add
axis titles.
Sample Chart.
Click Next,
In the Chart Wizard, Step 4 of 4, you determine the placement of the chart in the workbook.
You can display a chart as an object on the current sheet, on any other existing sheet, or on a
newly created chart sheet.
Click Finish
Objective 5: Moving & Resizing a Chart
Once you have created a chart, it’s easy to modify it to make it easier to read and understand. You can create
titles for the x-axis and y-axis, add graphics, add background color, or format the text you use in a chart.
Click Titles tab in the Chart Options dialog box, then type a title in
the Category (X) axis box
Click the Value (Y) axis text box, type a title, then click OK
Press ESC to deselect the Value-axis title
Click the Chart Title to select it
Click the Format Chart Title button on the Chart toolbar to open
the Format Chart Title dialog (If Chart
toolbar is not present, Go to View, Toolbars, Chart)
Make sure the Patterns tab is selected, and then click the Shadow
checkbox.
Click the Font tab in the Format Chart Title dialog box, make
changes, Click OK
Click the Category Axis Title, Click the Format Object button,
click the Font tab, make changes to the Font selection and/or Font
Sizes, Click the Alignment tab, then go to the Orientation tab to
adjust the text, then click OK
Click the Value Axis Title, Click the Format Object button, Click
the Font tab, make changes to the Font selection and/or Font Sizes,
Click the Alignment tab, then go to the Orientation tab to adjust
the text, Click OK, then press [ESC] to deselect the title
A data series is the information, usually numbers or values that Excel plots on a chart. You can customize
the data series in a chart easily by altering the spreadsheet range that contains the chart data or by entering
descriptive text, called a data label that appears above a data marker in a chart.
Click the Chart Objects list arrow on the Chart toolbar, click a Series, click the Format Object button, then
click the Patterns tab in the Format Data Series dialog box.
Area choices
of color
Under Area, click a color choice, click OK, press [ESC} to deselect the data series, press [ESC] again to
deselect the entire chart.
Current color
of data series
Excel automatically plots and formats all chart data and places chart axes within the chart’s plot area. Data
values in two-dimensional charts are plotted on the value (y)
axis and categories are plotted on the category (x) axis. You
can override any of these settings by following these steps.
Click the Chart, click the Chart Objects list arrow on the Chart
toolbar, then click Value Axis.
Click the Format Object button on the Chart toolbar, then
click the Scale tab
Note: The check marks under Auto indicate the default scale
settings. You can override any of these settings by entering a
new value.
In the boxes, type desired values for Maximum, Minimum,
and Increment units, then click OK.
With the Value Axis still selected, click Format Object button
on the Chart toolbar, then click the Number tab
Under Category click General, click OK, press [Esc] twice
Click the Arrow button on the Drawing toolbar (The pointer changes to + and the status bar displays “Click
and drag to insert an AutoShape.” When you draw an arrow, the point farthest from where you start will
have the arrowhead.)
Position + under your text selection in the text box, press and hold the left mouse button
Drag the line to the designated point, then release the mouse button.
Click anywhere to close the Drawing toolbar or
After you complete a chart to your satisfaction, you will need to print it. Previewing a chart gives you a
chance to see what your chart looks like before you print it. You can print a chart by itself, or as a part of
the worksheet.
Note: If you want to print only the chart without the date, leave the chart selected.
Print Preview
The simple Edit, Paste command places copied content in a new location. Choosing Edit, Paste Special
enables you to create a link between the source and target worksheets or workbooks.
NOTE
You can establish one or more links within a single worksheet, enabling you to enter repeated information
once and have it update to one or more additional cells automatically.
To copy and link content between worksheets or workbooks in Excel, follow these steps:
When copying between workbooks, be sure both workbooks are open and have been saved.
Select and copy the source content in the source worksheet. This content will become the linked object.
Move to the target worksheet, select the cell where you want the linked data to begin, and choose Edit, Paste
Special to open the Paste Special dialog box.
In most cases, use the All option that's selected by default when creating a paste link.
Make any selections pertaining to the content and formatting you want to
include in the pasted material. In most cases, the default All selection is
exactly what you need.
Click the Paste Link button. Note that this button doesn't open another
dialog box, as you might expect. Instead, it immediately executes the
link.
After linking a source and target, test the link by switching to the source
cells and making a change to their content. Check the target, and see that
the change is reflected. When viewing the target, notice that the Formula
bar shows the link, listing the source location, as shown in Figure 3.24.
The workbook name appears in brackets ([ ]), followed by the worksheet
name with an exclamation point (!) and the range name or cell reference.
When a target cell is selected, the Formula bar displays the source
filename, sheet name, and cell address.
If you aren't the primary editor of the source
document, it might be safer to choose Don't Update,
and then check the source document before
updating the linked data.
To update a link between two workbooks after the target has been opened, follow these steps:
In the document containing the linked material (the target), choose Edit, Links to display the Links dialog
box.
Links can be edited only from within the target document. The Links command is disabled in the Edit menu
if you attempt to access it from the source document or any unlinked workbook.
In the Links dialog box, click the link you want to update in the Source File list.
It's a good idea to save the workbook before updating any links. If you regret having
updated them, you can close the file without saving.
Click the Update Values button.
Click Close.
TIP
To quickly update all links with one fast keystroke, press F9 in the workbook that contains linked data. Note,
however, that this technique is useful only when the following conditions are in place:
The workbook containing the links has calculation set to Manual (choose Tools, Options, click the
Calculation tab, and select Manual).
The source workbook is open. Keep in mind that if you've set your calculations to Manual none of the
calculations will work unless you press F9.
Locking Linked External Data
Worksheets can occasionally include links to OLE-compatible applications other than Excel. To prevent
accidental updates of these links, you can lock the links. Choose Tools, Options to open the Options dialog
box, and click the Calculation tab. Remove the check mark in the Update Remote References box. To resume
updates in the future, turn the option back on.
Redirecting Links
If you rename a workbook to which other workbooks are linked, the links break. You can repair the broken
links by redirecting them to the renamed file. To do so, move to the target document (the workbook that
contains the links) and choose Edit, Links. Click the Change Source button, and choose the appropriate file
from the Change Links dialog box. By default, the cell addresses that were copied will be retained.
Breaking Links Between Files
You can break links by choosing Edit, Links, Break Link. Most broken links occur accidentally—the user
changes the name of either the source or target file or moves one or both files to a new folder. Any change in
name or location of either the source or target file will result in a broken link.
27) Macros
- Excel changes to Enter mode when you indicate you want to enter information. Either by
clicking into the formula bar, double clicking on a blank cell or simply by beginning to type in any cell.
In Enter mode, the text navigation keys (arrows, home/end) work on the spreadsheet level moving you
between cells.
- Excel changes to Edit mode when you double click on a cell with data in it, or when you
press the F2 key on the keyboard. Edit mode allows you to use the text navigation keys (arrows,
home/end) to move among the characters.
Esc (escape) acts as a cancel; if you are editing/entering a cell, escape will go back to enter mode ignoring
any changes you have made. This is the same as clicking the red X on the formula bar.
Tab moves right to a cell (if in Edit/Enter mode, Tab will accept changes and move right)
Shift-Tab moves left
Ctrl-Tab moves you to another Workbook (another open file)
Alt-Tab moves you to another open application (program such as MS Word)
Enter moves down a cell (if in Edit/Enter mode, Enter will accept changes and move down)
Shift-Enter moves up
In Edit/Enter Mode
Alt-Enter forces a cell to put text on a second line
Ctrl-Enter accepts changes and remains on that cell. This is the same as clicking the green on the formula
bar.
Home
Edit Mode -
Home moves to the beginning of the cell
Shift-Home will select from where the cursor is blinking to the beginning of the cell
Enter/Ready Mode -
Home moves to the first column
Shift-Home will select from the current cell to the first column
Ctrl-Home will move to the very top of your worksheet
Shift-Ctrl-Home will select from the current cell to the very top of the worksheet
End
Edit Mode –
End will move to the end of the cell
Shift-End will select from where the cursor is blinking to the end of the cell
Ctrl-End moves to the last working cell on the worksheet, which is the cell at the intersection of the right-
most used column and the bottom-most used row (in the lower-right corner)
Shift-Ctrl-End will select to the last (working) cell on the spreadsheet
Double clicking on a blank cell will put that cell into enter mode, double clicking on a cell with data in it will
put that cell in edit mode.
If you use Shift and the mouse you can select a range (a set of conjoining cells). Click where you want to
start, hold down the Shift key and click where you want to stop. Every cell in between will be selected.
If you use the Ctrl and the mouse you can select various cells. (skipping ones in between). You cannot use
these in equations but you can apply to formatting (change several cells to red text).
To run the macro by pressing a keyboard shortcut key, enter a letter in the Shortcut key box, either when
you create the macro, or later from the Options button on the Macro Window. You can use CTRL+ letter or
CTRL+SHIFT+ letter, where letter is any letter key on the keyboard. The shortcut key will override any
default Microsoft Excel shortcut keys while the workbook that contains the macro is open.
Tools-Macro-Record New Macro Tools-Macro-Macros…-(select macro)-Options
Ctrl-A – Select All
Ctrl-B – Bold
Ctrl-C – Copy
Ctrl-D – Fill down
Ctrl-E – Unassigned
Ctrl-F – Find
Ctrl-G – Goto
Ctrl-H – Replace
Ctrl-I – Italicize
Ctrl-J – Unassigned
Ctrl-K – Hyperlink
Ctrl-L – Unassigned
Ctrl-M – Unassigned
Ctrl-N – New Workbook
Ctrl-O – Open Workbook
Ctrl-Shift-O – Select Cells with Comments
Ctrl-P – Print
Ctrl-R – Fill to the right
Ctrl-S – Save
Ctrl-T – Unassigned
Ctrl-U – Underline
Ctrl-V – Paste
Ctrl-W – Close Workbook
Ctrl-X – Cut
Ctrl-Y – Redo/Repeat the last action
Ctrl-Z – Undo
Macro is a series of commands executed from just one command from the user. You can use Excel’s macros
to automate tasks that you find yourself repeatedly doing.
The first step is to give your macro a descriptive name. You cannot use spaces, dashes (hyphens) or other
special characters in your macro name, if you try, you will get an "That name is invalid" error message. You
can use underscores ( _ ) in place of spaces/dashes. (i.e. Page_Setup or Delete_Spaces will work).
Next decide where to store the macro. You can save it in the current workbook (This Workbook). This choice
will attach this macro to the current workbook, and it will only be accessible when this workbook is open. If
you want to be able to use the macro from any workbook on that computer, choose the "Personal Macro
Workbook".
Decide if you want a shortcut key assigned to this Macro. If you do not want a shortcut key, leave the option
blank, and click OK to begin recording your macro.
If desired, you can enter a description to better explain what this macro will do.
Recording a Macro
After you’ve named your macro, Excel takes you back into your spreadsheet. There are a few clues
that show you are recording. The biggest is your mouse now has a tape cassette attached to it.
You will also have a new toolbar floating on your screen. If you would like you can move the
toolbar without affecting the macro, by clicking and dragging the blue title bar of the toolbar.
This new toolbar only has two buttons, Stop and Use Relative Reference. If you click the X to close this
menu, Excel will stop recording the macro. You can also stop recording by clicking Stop.
The Use Relative Reference button determines whether the Macro recorder uses relative or absolute
references to the cells on a worksheet. The button is set to Absolute when it's first shown. This means that
Excel will record the exact address. Absolute references do not automatically adjust when you insert rows
and columns. When the button is pushed, Excel will keep track of a Relative Reference. This means Excel
will record the macro, relative to where you start. It is very possible to switch between modes while
recording your macro.
Once you have completed all the steps that you wanted to automate, stop the macro.
You should test the macro to make sure that it works, if you assigned a keyboard shortcut, use that, otherwise
go through the menu, Tools-Macros-Macros… (Alt-F8), choose the macro and Run.
If you Edit the macro you will actually see the visual basic code. This is also the window where you can
delete a macro.
If you have saved your macro in the PERSONAL.XLS as the macro show above was, then you will not be able
to delete the macro yet, you will have to unhide the personal workbook.
Window->Unhide->Personal.xls->OK
Once you are in this Worksheet, you can delete the macros saved here, just be sure to hide this worksheet
again when you are done. (Window->Hide)
Adding Toolbars and Buttons
To add a toolbar, choose Tools-Customize, click on the Toolbar tab. Click the new button:
To add buttons to the toolbar switch to the Commands tab, on the Customize Window.
If the button you desire already exists you can click and drag the button to the toolbar. As you
drag the button to the toolbar, you will see
an I marker on the toolbar to indicate where
it's placing the button.
If you would like to add the buttons for your
macros, scroll to the bottom of the categories list.
Choose Macros and drag over the Custom
Button that is a happy face.
To assign the button to your macro, make
sure the button is highlighted, as shown
here (it has the box around it), from the Customize
window choose Modify Selection. Choose Assign Macro…, Select the macro you want for this button, and
click OK.
To change the way the button looks, so you don't have 10 happy face buttons,
click on the Modify Selection button again. You can Change the Button Image,
or give the button an appropriate Name and tell Excel to use Text Only
or Image and Text.
You can also copy and paste an existing button image and even Edit the Button
Image to create your own graphical button.