introduction to excel and excel fundamentals format cells in excel, you can use the font group on...
TRANSCRIPT
Spreadsheet_Fundamentals.doc
Spreadsheet Fundamentals
Ribbons and Tabs
Enter labels, numbers and formulas
Edit and delete cell entries
Format cells
Left justify, right justify, center and center across columns
Change column widths and row heights
Insert/delete and hide/unhide rows and columns
Insert, delete and change the names of worksheets in a workbook
Save your workbook to disk
How to move and copy information on a spreadsheet
How to name ranges
Protection of Cells, Worksheets, and Workbooks
Understand the difference between relative and absolute cell addresses
Understand the following functions:
=IF(logical_test,value_if_true,value_if_false)
=SUM(number1,number2,...) or =SUM(range1, range2, ...)
=VLOOKUP(lookup_value,table_array,col_index_num,range_lookup)
=HLOOKUP(lookup_value,table_array,row_index_num,range_lookup)
=MIN(a,b,c,...,z)
=MAX(a,b,c,…,z)
=SUMIF(range,criteria,sum_range)
=SUMPRODUCT(array1,array2,array3, ...)
=PRODUCT(number1,number2, ...)
=AVERAGE(number1,number2, ...)
=MMULT(array1,array2)
=SUMXMY2(array_x,array_y)
Printing your work
Macros/VBA
2
2
Enter Labels, Numbers, and Formulas
It is easy to enter data (numbers) in Excel. Just move to the cell in which you want to enter the data,
type the data and press Enter. The selection (active cell) moves down, ready for the next entry.
Microsoft Excel will allow two types of data entry:
Constants - data typed directly into the cell; it can be numeric (date, time, currency, etc.) or
text.
Formulas - a sequence of values, cell references, names of functions or operators (+, -, *, etc.)
that produces a new value from existing values. Formulas always begin with an equal sign
(=).
If you see "####", this means that the number is too long to be displayed in the cell. Just widen the
column to accommodate the width of the number.
Text can be characters or any combination of numbers and characters. Any set of characters entered a
cell that is not interpreted as a number, formula, date, time, logical value or error, is interpreted as text.
Text wrapping can also be a useful tool when using long strings in a cell. This allows you to display
multiple lines in a cell. On the Home tab, in the Alignment group, click Wrap Text .
Logical values are the result of a logical function or equation. Valid logical values are TRUE and
FALSE.
Error values are displayed when a formula cannot be properly calculated. Error values always begin
with an number sign (#). Below is a list of the errors in Excel.
This error value Means that a formula
#DIV/0! Is trying to divide by zero.
#N/A Refers to a value that is not available.
#NAME? Uses a name that Excel does not recognize
3
3
#NULL! Specifies an invalid intersection of two areas.
#NUM! Uses a number incorrectly.
#REF Refers to a cell that is not valid.
#VALUE Uses an incorrect argument or operand.
If a formula includes a reference to a cell that contains an error value, that formula also produces an error
value.
When entering numbers as constants, you can use 0-9 and any of the following operators:
+, -, ( ), /, $, %, E, e, ., and ,.
Also, when entering numbers in formulas, DO NOT use ( ) to represent negative, comma to separate
thousands or $ to represent currency.
Formulas can take on many forms using references, functions, text and numbers to perform a variety of
tasks. Simply think of the formulas as one side of the equation with the result shown in the cell. We can
enter a formula into Excel by using the formula bar or editing within a cell.
The basic arithmetic operators are: +, -, /, *, %, and ^.
Comparison operators (which compares two values and produces a logical TRUE or FALSE) are: =, >,
<, >=, <=, and <> (not equal to). For example, the formula =A1<25 produces TRUE if A1 is less than
25; otherwise it produces a value of FALSE.
Also, if you want to combine expressions or change the order of evaluations, use parentheses in your
formula. Excel first calculates the expressions in parentheses and then calculates the formula.
Edit and Delete Cell Entries
To edit a cell entry, click onto the cell and press the F2 function key. Then the current contents of the
cell will be displayed in the formula bar. Now you can edit the cell.
To delete a cell entry, click on the cell and press the delete key.
4
4
Formatting Cells
Formatting your data will make the worksheet easier to read and more visually appealing. You can
format your worksheet cells before or after you have entered the data. To format cells in Excel, you can
use the Font Group on the Home tab.
Some examples of formatting would be:
Change font or font size
Change width of column
Change height of rows
Change numeric format
Alignment (left, right, center)
To change column width, we can do one of the following:
Drag the right column heading border to the right (to increase width) or left (to decrease
width.
Select the Cells group from the Home tab and click Format to do one of the following:
1. Set a numeric column width (allows you to set a column width)
2. AutoFit Selection (adjust width to fit longest cell value)
To adjust the row height, you can do one of the following:
Drag the bottom of the row border of the row heading to the selected height
Select the Cells group from the Home tab and click Format to do one of the following:
1. Set a numeric row height
2. AutoFit (will adjust the row to fit the largest font)
5
5
Hide one or more rows or columns
1. Select the rows or columns that you want to hide.
2. On the Home tab, in the Cells group, click Format.
3. Do one of the following:
Under Visibility, point to Hide & Unhide, and then click Hide Rows or Hide Columns.
Under Cell Size, click Row Height or Column Width, and then type 0 in the Row Height or
Column Width box.
TIP You can also right-click a row or column (or a selection of multiple rows or columns), and then click Hide.
Hiding rows or columns does not delete them from your worksheet; it just puts them out of sight. You
can hide a row or column using the steps mentioned above. To unhide rows or columns, see the
following.
Locate hidden cells on a worksheet
When you want to unhide cells in hidden rows or columns in your worksheet, it can be hard to locate them. By finding and
selecting all visible cells in the worksheet, you can more easily detect the hidden rows and columns.
For more information about displaying hidden rows or columns, see Hide or display rows and columns.
1. Click the worksheet that contains the hidden rows and columns that you want to locate.
2. On the Home tab, in the Editing group, click Find & Select.
6
6
3. Click Go To Special.
4. Under Select, click Visible cells only, and then click OK.
All visible cells are selected and the borders of rows and columns that are adjacent to hidden rows and columns are
marked with a white border.
NOTE Clicking anywhere on the worksheet cancels the selection of the visible cells. If the hidden cells that you want to
unhide are outside the visible worksheet area, use the scroll bars to move through the document until the hidden rows and
columns that contain those cells are visible.
Inserting and deleting rows and columns is also easy to do in Excel.
Insert blank cells on a worksheet
1. Select the cell or the range of cells where you want to insert the new blank cells. Select the same number of
cells as you want to insert. For example, to insert five blank cells, you have to select five cells.
2. On the Home tab, in the Cells group, click the arrow below Insert, and then click Insert Cells.
TIP You can also right-click the selected cells and then click Insert.
3. In the Insert dialog box, click the direction in which you want to shift the surrounding cells.
7
7
NOTES
When you insert cells on a worksheet, all references that are affected by the insertion adjust accordingly,
whether they are relative or absolute cell references. The same behavior applies to deleting cells, except when a
deleted cell is directly referenced by a formula. If you want references to adjust automatically, it's a good idea to use
range references whenever appropriate in your formulas, instead of specifying individual cells.
You can insert cells that contain data and formulas by copying or cutting the cells, right-clicking the location
where you want to paste them, and then clicking Insert Copied Cells or Insert Cut Cells.
Tips
To quickly repeat the action of inserting a cell, click the location where you want to insert the cell, and then press
CTRL+Y.
If there is formatting applied to the cells that you copied, you can use Insert Options to choose how to set
the formatting of the inserted cells.
Top of Page
Insert rows on a worksheet
1. Do one of the following:
To insert a single row, select either the whole row or a cell in the row above which you want to insert
the new row. For example, to insert a new row above row 5, click a cell in row 5.
To insert multiple rows, select the rows above which you want to insert rows. Select the same
number of rows as you want to insert. For example, to insert three new rows, you select three rows.
To insert nonadjacent rows, hold down CTRL while you select nonadjacent rows.
2. On the Home tab, in the Cells group, click the arrow below Insert, and then click Insert Sheet Rows.
8
8
TIP You can also right-click the selected rows and then click Insert.
NOTE When you insert rows on your worksheet, all references that are affected by the insertion adjust accordingly, whether
they are relative or absolute cell references. The same behavior applies to deleting rows, except when a deleted cell is
directly referenced by a formula. If you want references to adjust automatically, it's a good idea to use range references
whenever appropriate in your formulas, rather than specifying individual cells.
Tips
To quickly repeat the action of inserting a row, click the location where you want to insert the row, and then
press CTRL+Y.
If there is formatting, you can use Insert Options to choose how to set the formatting of the inserted rows.
Insert, Delete, and Change Names of Worksheets
Recall that a workbook is the place in which all of your data is stored. So the relationship between the
worksheet and the workbook is similar to pages in a notebook.
The sheet name appears at the bottom of the workbook window.
You can also change the name of any sheet to a name of up to 31 characters, including spaces. To do so,
double-click on the tab of the sheet you want to rename. In Excel the sheet name is highlighted and you
just have to type in the new name.
We can do any of the following with worksheets:
Insert new sheets
Delete sheets
Rename sheets
Move or copy sheets within a workbook or to another workbook
Hide/Unhide sheets
NOTE: If you don’t see the sheet tabs in your workbook, choose File from the Main Menu and select
Options. After selecting Advanced in the left-hand panel, the Excel Options dialog box, shown below,
allows you to configure the display.
9
9
Moving and Copying Information
You can change the location of cells on a worksheet by copying or moving the cells to a different part of
the worksheet. This can be done using the Cut, Copy, and Paste commands.
When you copy a cell, the cell's contents are duplicated into a new location. When you move a cell, the
contents are posted into a new location after being moved from the original location. You can insert the
cells that you are copying between existing cells or overwrite existing cell contents.
Move or copy entire cells
When you move or copy a cell, Excel moves or copies the entire cell, including formulas and their resulting values, cell
formats, and comments.
1. Select the cells that you want to move or copy.
2. On the Home tab, in the Clipboard group, do one of the following:
10
10
To move cells, click Cut .
Keyboard shortcut You can also press CTRL+X.
To copy cells, click Copy .
Keyboard shortcut You can also press CTRL+C.
3. Select the upper-left cell of the paste area.
Tip To move or copy a selection to a different worksheet or workbook, click another worksheet tab or switch to
another workbook, and then select the upper-left cell of the paste area.
4. On the Home tab, in the Clipboard group, click Paste .
Keyboard shortcut You can also press CTRL+V.
NOTES
To choose specific options when you paste cells, you can click the arrow below Paste , and then click the
option that you want. For example, you can click Paste Special or Paste As Picture.
Excel replaces existing data in the paste area when you cut and paste cells to move them.
When you copy cells, cell references are automatically adjusted. When you move cells, however, cell references
are not adjusted, and the contents of those cells and of any cells that point to them may be displayed as reference
errors. In this case, you will need to adjust the references manually.
If the selected copy area includes hidden cells, Excel also copies the hidden cells. You may need to temporarily
unhide cells that you don't want to include when you copy information.
If the paste area contains hidden rows or columns, you might need to unhide the paste area to see all of the copied
cells.
11
11
Naming Ranges
Learn more about using names
A name is a meaningful shorthand that makes it easier to understand the purpose of a cell reference, constant, formula, or
table, each of which may be difficult to comprehend at first glance. The following information shows common examples of
names and how they can improve clarity and understanding.
Example Type Example with no name Example with a name
Reference =SUM(C20:C30) =SUM(FirstQuarterSales)
Constant =PRODUCT(A5,8.3) =PRODUCT(Price,WASalesTax)
Formula =SUM(VLOOKUP(A1,B1:F20,5,FALSE), —G5)
=SUM(Inventory_Level,—Order_Amt)
Table C4:G36 =TopSales06
Types of names
There are several types of names that you can create and use.
Defined name A name that represents a cell, range of cells, formula, or constant value. You can create your own defined
name, and Microsoft Office Excel sometimes creates a defined name for you, such as when you set a print area.
Table name A name for an Excel table, which is a collection of data about a particular subject that is stored in records
(rows) and fields (columns). Excel creates a default Excel table name of Table1, Table2, and so on, each time that you insert
an Excel table, but you can change the name to make it more meaningful. For more information on Excel tables, see Using
structured references with Excel tables.
12
12
The scope of a name
All names have a scope, either to a specific worksheet (also called the local worksheet level) or to the entire workbook (also
called the global workbook level). The scope of a name is the location within which the name is recognized without
qualification. For example:
If you have defined a name, such as Budget_FY08, and its scope is Sheet1, then that name, if not qualified, is
only recognized in Sheet1, but not in Sheet2 or Sheet3 without qualification.
To use a local worksheet name in another worksheet, you can qualify it by preceding it with the worksheet name, as
the following example shows:
Sheet1!Budget_FY08
If you have defined a name, such as Sales_Dept_Goals, and its scope is the workbook, then that name is
recognized for all worksheets in that workbook, but not for any other workbook.
A name must always be unique within its scope. Excel prevents you from defining a name that is not unique within its scope.
However you can use the same name in different scopes. For example, you can define a name, such as GrossProfit, scoped
to Sheet1, Sheet2, and Sheet3 in the same workbook. Although each name is the same, each name is unique within its
scope. You might do this to ensure that a formula that uses the name, GrossProfit, is always referencing the same cells at the
local worksheet level.
You can even define the same name, GrossProfit, for the global workbook level, but again the scope is unique. In this case,
however, there can be a name conflict. To resolve this conflict, by default Excel uses the name that is defined for the
worksheet, because the local worksheet level takes precedence over the global workbook level. If you want to override the
precedence and you want to use the workbook name, you can disambiguate the name by prefixing the workbook name as the
following example shows:
WorkbookFile!GrossProfit
You can override the local worksheet level for all worksheets in the workbook, with the exception of the first worksheet, which
always uses the local name if there is a name conflict, and cannot be overridden.
13
13
Creating and entering names
You create a name by using the:
Name box on the formula bar This is best used for creating a workbook level name for a selected range.
Create a name from selection You can conveniently create names from existing row and column labels by
using a selection of cells in the worksheet.
New Name dialog box This is best used for when you want more flexibility in creating names, such as
specifying a local worksheet level scope or creating a name comment.
NOTE By default, names use absolute cell references.
You can enter a name by:
Typing Typing the name, for example, as an argument to a formula.
Using Formula AutoComplete Use the Formula AutoComplete drop-down list, where valid names are
automatically listed for you.
Selecting from the Use in Formula command Select a defined name from a list available from the Use in
Formula command in the Defined Names group on the Formulas tab.
Auditing names
You can also create a list of defined names in a workbook. Locate an area with two empty columns on the worksheet (the list
will contain two columns, one for the name and one for a description of the name). Select a cell that will be the upper-left
corner of the list. On the Formulas tab, in the Defined Names group, click Use in Formula, click Paste, and then in the
Paste Names dialog box, click Paste List.
Top of Page
Learn about syntax rules for names
The following is a list of syntax rules that you need to be aware of when you create and edit names.
Valid characters The first character of a name must be a letter, an underscore character (_), or a backslash
(\). Remaining characters in the name can be letters, numbers, periods, and underscore characters.
14
14
NOTE You cannot use the letters "C", "c", "R", or "r" as a defined name, because both of these letters are used as a
shorthand for selecting a row or column for the currently selected cell when you enter them in a Name or Go To text
box.
Cell references disallowed Names cannot be the same as a cell reference, such as Z$100 or R1C1.
Spaces are not valid Spaces are not allowed. Use the underscore character (_) and period (.) as word
separators, such as, Sales_Tax or First.Quarter.
Name length A name can contain up to 255 characters.
Case sensitivity Names can contain uppercase and lowercase letters. Excel does not distinguish between
uppercase and lowercase characters in names. For example, if you created the name Sales and then create another
name called SALES in the same workbook, Excel prompts you to choose a unique name.
Top of Page
Create a name for a cell or cell range on a worksheet
1. Select the cell, range of cells, or nonadjacent selections that you want to name.
2. Click the Name box to the left of the formula bar.
Name box
3. Type the name that you want to use to refer to your selection. Names can be up to 255 characters in length.
4. Press ENTER.
NOTE You cannot name a cell while you are changing the contents of the cell.
Top of Page
15
15
Create a name by using a selection of cells in the worksheet
You can convert existing row and column labels to names.
1. Select the range that you want to name, including the row or column labels.
2. On the Formulas tab, in the Defined Names group, click Create from Selection.
3. In the Create names from Selection dialog box, designate the location that contains the labels by selecting the
Top row, Left column, Bottom row, or Right column check box.
NOTE A name created by using this procedure refers only to the cells that contain values and does not include the existing
row and column labels.
Top of Page
Create a name by using the New Name dialog box
1. On the Formulas tab, in the Defined Names group, click Define Name.
2. In the New Name dialog box, in the Name box, type the name that you want to use for your reference. Names
can be up to 255 characters in length.
3. To specify the scope of the name, in the Scope drop-down list box, select Workbook, or the name of a
worksheet in the workbook.
4. Optionally, enter a descriptive comment up to 255 characters.
5. In the Refers to box, do one of the following:
Cell reference The current selection is entered by default. To enter other cell references as an argument, click
Collapse Dialog (which temporarily hides the dialog box), select the cells on the worksheet, and then click
Expand Dialog .
Constant Type an = (equal sign), followed by the constant value.
Formula Type an = (equal sign) followed by the formula.
6. To finish and return to the worksheet, click OK.
16
16
TIP To make the New Name dialog box wider or longer, click and drag the grip handle at the bottom.
Top of Page
Manage names by using the Name Manager dialog box
Use the Name Manager dialog box to work with all of the defined names and table names in the workbook. For example, you
may want to find names with errors, confirm the value and reference of a name, view or edit descriptive comments, or
determine the scope. You can also sort and filter the list of names, and easily add, change, or delete names from one
location.
To open the Name Manager dialog box, on the Formulas tab, in the Defined Names group, click Name Manager.
View names
The Name Manager dialog box displays the following information about each name in a list box:
This Column: Displays:
Icon and Name
One of the following:
A defined name, which is indicated by a defined name icon.
A table name, which is indicated by a table name icon.
Value The current value of the name, such as the results of a formula, a string constant, a cell range, an error, an array of values, or a placeholder if the formula cannot be evaluated. The following are representative examples:
"this is my string constant"
3.1459
{2003;12,2002;23,;2001,18}
#REF!
{...}
Refers To The current reference for the name. The following are representative examples:
=Sheet1!$A$3
=8.3
=HR!$A$1:$Z$345
=SUM(Sheet1!A1,Sheet2!B2)
17
17
Scope A worksheet name, if the scope is the local worksheet
level.
"Workbook", if the scope is the global worksheet level.
Comment Additional information about the name up to 255 characters. The following are representative examples:
This value will expire on May 2, 2007.
Don't delete! Critical name!
Based on the ISO certification exam numbers.
NOTE If you save the workbook to Microsoft Office SharePoint Server 2007 Excel Services, and you specify one or more
parameters, the comment is used as a tooltip in the Parameters toolpane.
NOTES
You cannot use the Name Manager dialog box while you are changing the contents of the cell.
The Name Manager dialog box does not display names defined in Visual Basic for Applications (VBA), or
hidden names (the Visible property of the name is set to "False").
Protection of Cells, Worksheets, and Workbooks
Overview of worksheet or workbook element protection
When you share a workbook with other users, you may want to protect data in specific worksheet or workbook elements to
help prevent it from being changed. You can also specify a password that users must enter to modify specific, protected
worksheet and workbook elements. In addition, you can prevent users from changing the structure of a worksheet.
Protecting worksheet elements
By default, when you protect a worksheet, all the cells on the worksheet are locked, and users cannot make any changes to a
locked cell. For example, they cannot insert, modify, delete, or format data in a locked cell. However, you can specify which
elements users will be able to change when you protect the worksheet.
Hiding, locking, and protecting workbook and worksheet elements is not intended to help secure or protect any confidential
information that you keep in a workbook. It only helps obscure data or formulas that might confuse other users and prevents
them from viewing or making changes to that data.
18
18
Excel does not encrypt data that is hidden or locked in a workbook. To help keep confidential data confidential, you may want
to limit access to workbooks that contain such information by storing them in a location that is available only to authorized
users.
Before you protect a worksheet, you can unlock the ranges that you want users to be able to change or enter data in. You can
unlock cells for all users or for specific users.
For information on how to unlock cells and ranges in a protected worksheet, see Unlock specific areas of a protected
worksheet.
Using a password to control access to protected elements
When you protect a worksheet or workbook by locking its elements, adding a password to edit the unlocked elements is
optional. In this context, the password is only intended to allow access to certain users while helping to prevent changes by
other users. This level of password protection does not guarentee that all sensitive data in your workbook is secure. For
optimal security, you should secure a workbook itself with a password to help safeguard it from unauthorized access.
When you protect worksheet or workbook elements by using a password, it is very important that you remember that
password. Without it, you cannot unprotect the workbook or worksheet.
IMPORTANT
Use strong passwords that combine uppercase and lowercase letters, numbers, and symbols. Weak passwords don't mix
these elements. Strong password: Y6dh!et5. Weak password: House27. Passwords should be 8 or more characters in length.
A pass phrase that uses 14 or more characters is better. For more information, see Help protect your personal information
with strong passwords.
It is critical that you remember your password. If you forget your password, Microsoft cannot retrieve it. Store the passwords
that you write down in a secure place away from the information that they help protect.
Protecting the structure and windows of a workbook
You can lock the structure of a workbook, which prevents users from adding or deleting worksheets or from displaying hidden
worksheets. You can also prevent users from changing the size or position of worksheet windows. Workbook structure and
window protection applies to the whole workbook.
19
19
Top of Page
Protect worksheet elements
1. Select the worksheet that you want to protect.
2. To unlock any cells or ranges that you want other users to be able to change, do the following:
1. Select each cell or range that you want to unlock.
2. On the Home tab, in the Cells group, click Format, and then click Format Cells.
3. On the Protection tab, clear the Locked check box, and then click OK.
3. To hide any formulas that you do not want to be visible, do the following:
1. In the worksheet, select the cells that contain the formulas that you want to hide.
2. On the Home tab, in the Cells group, click Format, and then click Format Cells.
3. On the Protection tab, select the Hidden check box, and then click OK.
4. To unlock any graphic objects (such as pictures, clip art, shapes, or Smart Art graphics) that you want users to
be able to change, do the following:
1. Hold down CTRL and then click each graphic object that you want to unlock.
This displays the Picture Tools or Drawing Tools, adding the Format tab.
TIP You can also use the Go To command to quickly select all the graphic objects in a worksheet. On the
Home tab, in the Editing group, click Find & Select, and then click Go To. Click Special, and then click
Objects.
2. On the Format tab, in the Size group, click the Dialog Box Launcher next to Size.
3. On the Properties tab, clear the Locked check box, and if present, clear the Lock text check box.
20
20
NOTE You do not need to unlock buttons or controls for users to be able to click and use them. You can
unlock embedded charts, text boxes, and other objects created with the drawing tools that you want users to
be able to modify.
5. On the Review tab, in the Changes group, click Protect Sheet.
6. In the Allow all users of this worksheet to list, select the elements that you want users to be able to change.
More information about the elements that you can select
Clear this check box To prevent users from
Select locked cells Moving the pointer to cells for which the Locked check box is selected on the Protection tab of the Format Cells dialog box. By default, users are allowed to select locked cells.
Select unlocked cells Moving the pointer to cells for which the Locked check box is cleared on the Protection tab of the Format Cells dialog box. By default, users can select unlocked cells, and they can press the TAB key to move between the unlocked cells on a protected worksheet.
Format cells Changing any of the options in the Format Cells or Conditional Formatting dialog boxes. If you applied conditional formats before you protected the worksheet, the formatting continues to change when a user enters a value that satisfies a different condition.
Format columns Using any of the column formatting commands, including changing column width or hiding columns (Home tab, Cells group, Format button).
Format rows Using any of the row formatting commands, including changing row height or hiding rows (Home tab, Cells group, Format button).
Insert columns Inserting columns.
Insert rows Inserting rows.
Insert hyperlinks Inserting new hyperlinks, even in unlocked cells.
Delete columns Deleting columns.
NOTE If Delete columns is protected and Insert columns is not also protected, a user can insert
columns that he or she cannot delete.
Delete rows Deleting rows.
NOTE If Delete rows is protected and Insert rows is not also protected, a user can insert rows that
he or she cannot delete.
21
21
Sort Using any commands to sort data (Data tab, Sort & Filter group).
NOTE Users can't sort ranges that contain locked cells on a protected worksheet, regardless of this
setting.
Use AutoFilter Using the drop-down arrows to change the filter on ranges when AutoFilters are applied.
NOTE Users cannot apply or remove AutoFilters on a protected worksheet, regardless of this setting.
Use PivotTable reports Formatting, changing the layout, refreshing, or otherwise modifying PivotTable reports, or creating new reports.
Edit objects Doing the any of the following:
Making changes to graphic objects including maps, embedded charts, shapes, text boxes, and controls that you did not unlock before you protected the worksheet. For example, if a worksheet has a button that runs a macro, you can click the button to run the macro, but you cannot delete the button.
Making any changes, such as formatting, to an embedded chart. The chart continues to be updated when you change its source data.
Adding or editing comments.
Edit scenarios Viewing scenarios that you have hidden, making changes to scenarios that you have prevented changes to, and deleting these scenarios. Users can change the values in the changing cells, if the cells are not protected, and add new scenarios.
Select this check box To prevent users from
Contents Making changes to items that are part of the chart, such as data series, axes, and legends. The chart continues to reflect changes made to its source data.
Objects Making changes to graphic objects—including shapes, text boxes, and controls—unless you unlock the objects before you protect the chart sheet.
7. In the Password to unprotect sheet box, type a password for the sheet, click OK, and then retype the
password to confirm it.
NOTE The password is optional. If you do not supply a password, then any user can unprotect the sheet and
change the protected elements. Make sure that you choose a password that is easy to remember, because if you
lose the password, you cannot gain access to the protected elements on the worksheet.
Top of Page
Protect workbook elements
1. On the Review tab, in the Changes group, click Protect Workbook.
22
22
2. Under Protect workbook for, do one or more of the following:
To protect the structure of a workbook, select the Structure check box.
To keep workbook windows in the same size and position every time the workbook is opened, select
the Windows check box.
More information about the elements that you can select
Select this check box To prevent users from
Structure Viewing worksheets that you have hidden.
Moving, deleting, hiding, or changing the names of worksheets.
Inserting new worksheets or chart sheets.
NOTE Users will be able to insert an embedded chart in an existing worksheet.
Moving or copying worksheets to another workbook.
In PivotTable reports, displaying the source data for a cell in the data area, or displaying page field pages on separate worksheets.
For scenarios, creating a scenario summary report.
In the Analysis ToolPak, using the analysis tools that place results on a new worksheet.
Windows Changing the size and position of the windows for the workbook when the workbook is opened.
Moving, resizing, or closing the windows.
NOTE Users will be able to hide and unhide windows.
3. To prevent other users from removing workbook protection, in the Password (optional) box, type a password,
click OK, and then retype the password to confirm it.
23
23
NOTE The password is optional. If you do not supply a password, then any user can unprotect the workbook and
change the protected elements. Make sure that you choose a password that you can remember, because if you lose
the password, you cannot gain access to the protected elements in the workbook.
Top of Page
Protect elements in a shared workbook
1. If the workbook is already shared, and you want to assign a password to protect the sharing, you must unshare
the workbook by doing the following:
1. Have all other users save and close the shared workbook to avoid losing their work.
2. To keep a copy of the change history information that is lost when you unshare a workbook, do the
following:
1. On the Review tab, in the Changes group, click Track Changes, and then click
Highlight Changes.
2. In the When list, select All.
3. Clear the Who and Where check boxes.
4. Select the List changes on a new sheet check box, and then click OK.
5. Do one or both of the following:
To print the History worksheet, click Print .
To copy the history to another workbook, select the cells that you want to
copy, click Copy on the Home tab in the Clipboard group, switch to another workbook, click
where you want to place the copied data, and then click Paste on the Home tab in the
Clipboard group.
24
24
NOTE You may also want to save or print the current version of the workbook, because this history data
might not apply to later versions of the workbook. For example, cell locations, including row numbers, in
the copied history may no longer be current.
3. In the shared workbook, on the Review tab, in the Changes group, click Share Workbook.
4. On the Editing tab, make sure that you are the only person listed in the Who has this workbook
open now list.
5. Clear the Allow changes by more than one user at the same time. This also allows workbook
merging check box.
NOTE If this check box is not available, then you must unprotect the workbook before clearing the check box.
Do the following:
1. Click OK to close the Share Workbook dialog box.
2. On the Review tab, in the Changes group, click Unprotect Shared Workbook.
3. If you are prompted, enter the password, and then click OK.
4. On the Review tab, in the Changes group, click Share Workbook.
5. On the Editing tab, clear the Allow changes by more than one user at the same
time. This also allows workbook merging check box.
6. When you are prompted about the effects on other users, click Yes.
2. If needed, give specific users access to ranges, protect worksheets, protect workbook elements, and set
passwords for viewing and editing.
TIP For more information, see Unlock specific areas of a protected worksheet, Protect worksheet elements, and
Protect workbook elements.
3. On the Review tab, in the Changes group, click Share Workbook.
4. Select the Sharing with track changes check box.
5. To require that other users supply a password to turn off the change history, or to remove the workbook from
shared use, in the Password (Optional) box, type a password, click OK, and then retype the password to confirm it.
6. If prompted, save the workbook.
25
25
Top of Page
Remove protection from a worksheet
1. On the Review tab, in the Changes group, click Unprotect Sheet.
NOTE The Protect Sheet option changes to Unprotect Sheet when a worksheet is protected.
2. If prompted, type the password to unprotect the worksheet.
References: Relative vs. Absolute
Excel uses a technique called relative cell address when it copies a formula from one cell to another.
When Excel copies or moves a formula, it may adjusts the column letter(s) for each column. Formulas
copied to different rows will also have the row addresses adjusted properly.
Using the relative cell address in copied formulas is appropriate most of the time and that is the default
treatment. However, there are some instances when you do not want the cell address to be adjusted
automatically. For example, when calculating percentages of a total, you want to divide each item by the
same amount.
With references, we can:
Identify cells or groups of cells
Tell Excel which cells to look in to find values to be used in a formula
There are three types of cell references used in Excel:
Relative
Absolute
Mixed
26
26
Because references are based on row and column headings in a worksheet, the dollar sign ($) preceding the
row or column reference indicates which absolute cell reference is desired. Let C denotes a column letter,
and R denotes a row number.
CR Relative Reference. Both the row and column are adjusted when the expression is copied. This
reference tells Excel how to find another cell, starting from the cell containing the formula.
$C$R Absolute Reference. Neither row nor column is adjusted when the expression is copied. Gives the
exact location of the cell.
$CR Mixed Reference. The column is not adjusted when the expression is copied, BUT the row is
adjusted.
C$R Mixed Reference. When the expression is copied, the row is NOT adjusted BUT the column is
adjusted.
Besides typing in the references, you can select the reference in the formula bar and press the F4 function
key to toggle through the reference types (R, A, M_r, M_c)
Reference Operators
Additionally, there are also three types of reference operators;
Range (colon): Produces one reference to all the cells between and including the two references
(e.g.: B2:D2).
Union (comma) Produces one reference that includes the two references (e.g.: B4, D4).
Intersection (space) Produces one reference to cells common to the two references.
Referring to Other Sheets
You can also use references to cells located on other sheets in the same workbook. You can even refer to a
range of cells three-dimensionally through a range of sheets in a workbook. Following is the syntax for
referring to another sheet in a workbook:
sheetname!cellref
where: (1) the name of the worksheet is always an absolute reference;
27
27
(2) an exclamation point separates the sheet reference from the cell reference;
(3) the cell reference can be any of the three types.
Note that if the sheetname includes a space, you must enclose the entire sheet reference in quotation marks
(i.e., 'sheet name').
3-D References
A 3-D reference is a range that spans two or more sheets in a workbook. The following illustration
shows a formula using a reference to a range of cells on a range of sheets in a workbook.
=SUM(Sheet2:Sheet6!$A$2:$C$5)
where the sheet range is specified with a colon between the names of the beginning and ending sheets.
This formula adds the values contained in the range $A$2:$C$5 in each of the sheets between and
including Sheet2 and Sheet6.
To enter a reference to a range of worksheets into a formula, you can type the reference directly, or you can
select the worksheet tabs that indicate the beginning and ending sheets from which you want to include
references.
For example, to enter the reference shown above, we must do the following:
1. Begin entering our formula on a worksheet
2. Click the Sheet2 tab to begin the 3-D reference
3. Press SHIFT and click the Sheet6 tab
4. Select the range of cells we want
Effects of Moving and Copying on References
Moving
When you move cells, the values or references they contain never change. However, moving does affect
formulas that refer to the moved cells with the following effects:
Excel automatically adjusts all references to cells that are moved so that the references
designate the same cells in their new location.
28
28
Formulas that previously referenced the area to which you move the cells produce the #REF!
error value because you effectively delete the existing cells and replace them with the moved
cells.
Copying
Copying cells has a different effect on relative references and absolute references.
Relative References When you copy cells, Excel automatically adjusts relative references and
the relative parts of mixed references in the area where you paste the copied cells.
Absolute and Mixed References When you copy a formula and use the same cell references
from the original formula in the duplicate, use absolute or mixed references in your formula.
Functions for Decision Making
There are many built-in functions available in Excel that aid in the development of complicated
worksheets. These functions accomplish various tasks that might ordinarily require a sophisticated
calculator. The Function Wizard includes descriptions of all worksheet functions. Using the Function
Wizard, you can select a function, assemble the arguments correctly and insert the function into your
formula.
We can group the functions into five broad categories which include --among others--
1. Statistical functions
2. Mathematical functions
3. Financial functions
4. Date and time functions
5. Logical functions
Logical Functions: Conditional Values
There are certain situations in which the precise cell expression used depends on certain conditions. Excel
offers three functions that examine certain conditions before returning a value or expression.
The IF function uses a notation somewhat like a programming language to determine whether a condition
is true and substitutes one of two expressions. The two LOOKUP functions, VLOOKUP and
HLOOKUP, check a cell value against a table and returns the matching value.
29
29
IF Function
The parameters of the IF function include the logical test, a "TRUE" expression for the cell, and a
"FALSE" expression or value for the cell.
Logical tests in Excel are expressed with inequality signs: <,<=, =, >=, > and <> (not equal to).
The IF function can include references to other functions, including other IF functions, in its cell
expressions.
The syntax for the IF function is as follows:
IF(logical_test, value_if_true, value_if_false)
Thus, Excel tests the logical_test to determine whether it is true or false. If it is true, then the
"value_if_true" is returned; otherwise, the "value_if_false" is returned.
VLOOKUP Function
This useful functions allows the user to match a value in a table, and will "look up" a corresponding value
from that table. That is, VLOOKUP compares a search value with the first column in a list and returns an
associated value in the same row.
The syntax for the VLOOKUP function is:
=VLOOKUP(lookup_value, table_array, col_index_num, range_lookup)
where
lookup_value specifies the search value you want to compare with the first column in the list.
table_array is a cell range or range name for the lookup table, the first column of which contains
the lookup values.
col_index_num gives the number of the columns in the array where the value or label is to be
retrieved.
range_lookup argument specifies how to compare the search value with the first column. Entering
FALSE tells Excel to find an exact match for the search value. TRUE tells Excel to find an
approximate match.
30
30
Note: The VLOOKUP function requires the lookup column to be the first column of your list. If you
want to do a range lookup and the lookup column is not the first column of the list, then you must
use the vector form of the LOOKUP function. For example, the syntax
=Lookup(J4, 'Grading Scale'!A3:A14, 'Grading Scale'!B3:B14)
compares search values to the Range column values and returns the associated value in the Grade
column, regardless of the order of the columns in the list.
Example:
It is rather easy to use the VLOOKUP function to assign letter grades to numerical scores. Suppose my
grading scale is as follows:
Range Grade
< 55 F
55 - 62 D-
62 - 68 D
68 - 70 D+
70 - 72 C-
72 - 78 C
78 - 80 C+
80 - 82 B-
82 - 88 B
88 - 90 B+
90 - 92 A-
92 A
Before we can implement the VLOOKUP function, we need to set up the table or an array defining the
grading scale.
In searching for the perfect match, the list containing the values that you want to search much be in
ascending order. This is because Excel finds the first value greater than your search value and then
backs up one position and returns the associated value.
31
31
In Excel, the Grading Scale table would be as follows:
Range Grade
0 F
55 D-
62 D
68 D+
70 C-
72 C
78 C+
80 B-
82 B
88 B+
90 A-
92 A
Note: The ranges are defined as follows:
F: 0 score 55
D-: 55 score 62
.
.
.
A-: 90 score 92
A: score 92
If your lookup table is set up so that the lookup values are in the first row of a table rather than the first
column, you can use the HLOOKUP function instead of the VLOOKUP function. The HLOOKUP
function works identically to the VLOOKUP function, except that the table appears on its side,
horizontally.
32
32
The syntax for the HLOOKUP function is:
=HLOOKUP(lookup_value, table_array, col_index_num, range_lookup)
Also, values in the HLOOKUP table should be arranged in ascending order from left to right.
For both the HLOOKUP and VLOOKUP functions, the lookup values can be text, numbers, or logical
values. Also, upper- and lower-case text are equivalent.
SUMIF( ) Worksheet Function in Excel
SUMIF(range, criteria, sum_range)
Range is the range of cells you want evaluated.
Criteria is the criteria in the form of a number, expression, or text that defines which cells will be
added. For example, criteria can be expressed as 32, "32", ">32", "apples". Note that you can also use
cell references where constants are used.
Sum_range are the actual cells to sum. The cells in sum_range are summed only if their
corresponding cells in range match the criteria. If sum_range is omitted, the cells in range are summed.