Anda di halaman 1dari 55

Advance Excel 2003

Using Filters

When you have a database of information, there are times when you do not want to see all the data you
entered, only the data that meets criteria you specify. You can search for entries that match the criteria
exactly or data that matches other operators, such as greater than, less than, begins with, or does not equal.
Working with AutoFilter
A very useful tool included with Excel is the AutoFilter, which can help you search and extract specific
data from your worksheet.

The AutoFilter arrows at the top of each column allow you to select records from the following options:
• All. Displays all line items.
• To p 10. Displays the 10 most repeated or highest values in a field.
• Custom. Displays items that meet your specific requirements. You'll learn about custom filters in
the next section.
• Exact items. Displays a complete list of the items in the column. You can click one, and only the
records that contain that item will display.

The arrows on a filtered column are displayed in a different color than the others.

NOTE
To further isolate specific items, click the AutoFilter arrow in another column and select an item from the
list.
You may want to redisplay all rows and perform a different filter.
NOTE
Click on AutoFilter again if you no longer want the AutoFilter feature active.

Sorting

You can sort Excel data in ascending or descending order. In an ascending sort, Microsoft Excel sorts
numbers first, then alphanumeric data. Ascending will sort alphabetically A through Z or numerically
smallest to largest. Sorting descending will do just the opposite; it will sort alphabetically Z through A and
numerically largest to smallest. Blank cells are always placed last, whether sorting in ascending or
descending order.
Sorting with the Toolbar Buttons
Excel provides two buttons on the Standard toolbar to perform a simple sort, which is data sorted by a
single column. If your data is in an inclusive arrangement, you can use the toolbar buttons to quickly sort
by a specified column. One button, the AZ button, sorts the data in ascending order, and the other button,
the ZA button, sorts in descending order.
Data Subtotals
If your database contains numerical data, Excel can look at your database and create subtotals and grand
totals, which can help you manage and analyze your data. Before creating subtotals, you must first sort the
database by the field you want to subtotal. You can then calculate subtotals for any column that contains
numbers.
Understanding Function Syntax

Functions consist of several different parts. Like a formula, a function begins with an equal (=) sign. The
next part is the function name, which might be abbreviated to indicate what the function does. Examples of
a function name might be SUM, AVERAGE, or COUNT. After the name, you enter a set of parentheses
and enter arguments within those parentheses. Arguments are additional pieces of information that clarify
how you want the function to behave. Arguments can consist of one or more components, ranging from cell
addresses such as D13 or a range of cell addresses like D13:D25, to other variables such as a number of
digits you want Excel to do something to. With only a few exceptions, all functions in Excel must follow
that pattern. This function structure is called the syntax. Here are a few examples of function syntax. You'll
learn throughout this chapter what these functions do.
NOTE
Function names are not case sensitive.
• =SUM(B3:B21)
• =AVERAGE(F1:G6)
• =IF(B3>B4,"yes", "no")

Creating a Total with the SUM Function

The most commonly used function in Excel is the SUM function, which adds two or more values together
and displays the total in the current cell. If any of the values change, the SUM total will automatically
update. There are a number of different methods to enter the SUM function, but the following section
describes two of the most common ways. The syntax for the SUM function is =SUM(range of values to
total).
Entering a SUM Function
One way to enter a SUM function is to type the function in its syntax directly into a cell where you want
the answer. Like other formulas, Excel will display the answer in the current cell, but display the actual
function in the Formula bar.
Entering an Argument with the Keyboard
When you enter function arguments with the keyboard, you type the cell addresses you want to add. If the
cell addresses are adjacent to each other, you separate them with a colon (:). For example, typing B2:B5
will add the values in B2 plus B3 plus B4 plus B5. If the cell addresses you want to add are not adjacent,
you separate them with a comma. For example, B2, B5, B13 will add the values in cells B2 and B5 and
B13 but not the value of any cells in between. You can also combine adjacent and non-adjacent cells, such
as B2, B5, B13:B15 which would add the values in the cells B2 and B5 and B13, B14, and B15.

NOTE
When typing a cell address, the address is not casesensitive, but you must remember to type the column
letter first, followed by the row number.
Entering an Argument with the Mouse
Instead of typing cell addresses, you can use your mouse to highlight the desired cells. Highlighting the
cells instead of typing them makes it easier to see that you have selected the correct cells.

NOTE
If you have a non-adjacent range to select, separate them with a comma so Excel will let you continue to
the next selection.
Using the AutoSum Button
Since the SUM function is the function used most, Microsoft includes a button for it on the standard Excel
toolbar. This makes creating a simple addition formula a mouse click away!

If you want to total different cells than Excel has highlighted, select them with your mouse.
Using Other Functions

As mentioned at the beginning of this chapter, Excel includes over 230 different built-in functions that are
divided into categories according to the function's purpose. The SUM function, for example, is considered a
mathematical function.

Calculating with Mathematical Functions


You have learned how to create a mathematical function to add a series of numbers together by using the
SUM function. Excel includes many other mathematical functions, including some for complex
trigonometry calculations. The next section illustrates a couple of other commonly used mathematical
functions.
Using the INT Function
The INT function rounds a number down to the nearest integer. The number can be a specific number you
type or, more commonly, the reference to a specific cell. The syntax is =INT(cell address or number). For
example, to find the integer of cell B3, you would enter =INT(B3).
NOTE
Functions can be nested. For example, to find the integer of the SUM of a range of cells, you might type
=INT(=SUM(B3:B10)). Excel will add each cell and round down the total.
Using the ROUND Function
Whereas the INT function displays whole numbers for you, the ROUND function takes a value and rounds
it to a specified number of digits. The ROUND function contains two different arguments; one to specify
which cell you want to round and the second to tell Excel how many decimal places you want to display.
The syntax is =ROUND(number,num of digits). For example, if cell B10 has a value of 79.3264 and you
want it rounded to two decimal places, you would enter =ROUND(B10,2); then Excel would display the
answer of 79.3300.
Analyzing with Statistical Functions
Statistical-based functions provide a means for analysis of data. Statistical analysis helps you explore,
understand and visualize your data.
Using the AVERAGE Function
The AVERAGE function finds an average of a range of values. The syntax for this function is
=AVERAGE(range of values to average). An example might be =AVERAGE(B7:D7), which would add
the values in the three cells B7, C7, and D7, then divide that total by three to get the average value.
Using the MAX and MIN Functions
Two other common statistical functions are the MAX and MIN functions. The MAX function will display
the largest value in a range of cells, whereas the MIN function will display the smallest value in a range of
cells. The syntax is =MAX(range of values) or =MIN(range of values).
Using the COUNT and COUNTA Functions
The COUNT function is handy to find out how many numerical entries are in a specified area. The
COUNTA function is similar except it is not limited to numerical entries; it will count any non-blank cell,
no matter what type of information the cell contains. The syntax of these functions is very similar:
=COUNT(range of cells to count) and =COUNTA(range of cells to count).
Using Date Functions
Date functions are commonly used to enter the current date into a worksheet, or to calculate the difference
between two or more dates. Excel stores dates as sequential serial numbers so they can be used in
calculations. By default, January 1, 1900 is serial number 1, and September 16, 2003 is serial number
37880, because it is 37,880 days after January 1, 1900. When you type a date in Excel, it will display the
date in a regular date format, such as 9/16/2003, but behind the scenes Excel still considers that date a serial
number.
Because dates and times are values, they can be added, subtracted, and included in other calculations.
Using the NOW Function
If you enter the NOW function in a cell, Excel will display the current date and time. The date and time are
dynamic in that the current date and time will change whenever you recalculate anything in the worksheet.
By default, Excel recalculates the worksheet whenever any changes, additions, or deletions are made. The
NOW function does not contain any arguments, so the syntax is =NOW().
Finding the Difference between Two Dates
A very popular use for entering dates in an Excel worksheet is to find the number of days between two
dates. Since Excel stores dates as serial numbers, you can create a simple mathematical function to figure
the number of days between two dates. While this is more of a formula instead of an Excel function, the
mathematical calculation can include a cell with a date function, such as =NOW.
The example you see here is a formula to subtract the project start date from today's date, so the formula is
A1-D4.
NOTE
You cannot subtract a date that is later than another date, or the error #### appears in the cell.

Since both of the original dates are in a date format, Excel will display the difference in a date format. You
will need to tell Excel to display that value as a number.
NOTE
Unfortunately, there is no easy method to calculate the exact difference in years. While you can change the
mathematical formula to divide the total by 365, this calculation does not take into account leap years. It
will, however, give a pretty close calculation of years.
Figuring with Financial Functions
Financial functions perform elaborate calculations such as returns on investments or cumulative principal
or interest on loans. Functions exist to calculate future values or net present values on investments or to
calculate amortization.
Using the PMT Function
The PMT function calculates the payment for a loan based on a constant interest rate. You will need to
enter the interest rate, the number of payments, and the amount of the loan. The syntax is
=PMT(rate,nper,pv,fv,type) where rate is the interest rate, nper is the number of payments and pv is the
loan amount. There are two other optional arguments, including fv, (future value),which Excel assumes to
be zero unless you enter an fv. The other optional argument is for type, which refers to when the payment is
due.
NOTE
Be uniform about the units you use for specifying rate and nper. If you make monthly payments on a six-
year loan at an annual interest rate of 8 percent, use 8%/12 for rate and 6*12 for nper. If you make annual
payments on the same loan, use 8 percent for rate and 6 for nper.
NOTE
The payment amount returned by PMT includes principal and interest only
Understanding Logical Functions
You have seen that most functions work in basically the same way. You enter the equal sign, enter the
function name, and then tell the function which data to use. Most functions involve some sort of
mathematical calculation. Logical functions are different in that they use operators such as equal to (=),
greater than (>), less than (<), greater than or equal to (>=), less than or equal to (<=), and not equal to
(<>).
Using the IF Function
The IF function is a logical function that evaluates a condition and returns one of two answers, depending
on the result of the evaluation. The IF function has three parts. The first part determines if a situation is true
or false; the second part determines the result to display if the first part is true; and the third part determines
the result to display if the first part is false. It's really not as confusing as it may sound. The syntax is
=IF(item to test, value if true, value if false).
For example, in cell C1 you want to find out if the value in cell B5 is greater than the value in cell B6. If B5
is larger than B6 (true), you want to enter "Yes" in cell C1; if B5 is not larger than B6 (false), you want the
answer "No" in cell C1. You would enter the function as =IF(B5>B6,"Yes","No").
NOTE
If you want the result to be text, the result must be enclosed in quotation. The quotation marks will not be
displayed in the answer. No quotation marks are needed if the result is numeric.
Conditional Formatting

When you use conditional formatting, you can instruct Excel to change the formatting for a cell if the cell's
value meets a certain criteria. For example, if the sales for a particular salesperson meets a quota, you could
have Excel add blue shading and a border to the cell.

The second drop-down menu provides a list of operators such as greater than, less than, equal to, and
between.
MACRO

• To record a macro
• From the Tools menu, point to Macro and click on Record New Macro.
• From the Record Macro dialog box displayed, enter a name for the macro in the Macro name: text box.
• The default description is displayed in the Description: text box, and contains the date and user name. If
required, change it.
• To begin recording, click OK.
• Perform the actions you want the macro to record. Actions can be any combinations of Excel commands.
• To stop recording, from the Tools menu, point to Macro and click on Stop Recording.

To assign a shortcut key to the macro


• From the Tools menu, point to Macro and click on Macros.
• From the Macro dialog box displayed, select the macro name (if recorded before) to which you want to assign
a shortcut key.

• Click the Options button to display the Macro Options dialog box.
• Type a letter into the Ctrl+ text box. This combination key will be used to invoke the macro.
• Click OK to return to the Macro dialog box.
• Click on the Cancel button to close.

To run a macro using the Tools Macro command


• From the Tools menu, point to Macro and click on Macros.
• From the Macro dialog box displayed, click on the name of the macro you wish to run in the Macro name: list
box.
• Click the Run button.Note: If you wish to edit or delete a macro, just click on the particular button.
To run a macro using the assigned shortcut key
• Press Ctrl+?, with ? is the letter which you assigned.

To create a button and assign an Excel macro to it


• If the Forms toolbar is not display, right click on any toolbar that is visible and from the pop-up menu that is
displayed select Forms.
• To create a button, click the Button icon on the Forms toolbar.

• Then, click and drag the mouse to the intended button size.
• When release the mouse button, the Assign Macro dialog box will be displayed.

• Click on the Record button and the Record Macro dialog box will be displayed.
• Enter a name for the macro in the Macro name: text box.
• Click on the OK button.
• Record your macro in the normal way, and click on the button and select Edit Text from the pop-up menu.
• To run the macro, simply click on the button.

To change a button name


• Double click on the button to highlight the button name.
• Type in a new name and click on any worksheet cell to deselect the button.

To delete a button
• Click on button and press the Delete key.
• The Excel Formatting - Fonts

To change the font used in a cell or range of cells


• Select the cell or range of cells you wish to change.
• On the Excel Formatting toolbar choose a font from the Font drop down list.

To change other font characteristics


• Select the cell or range you wish to change.
• From the Format menu, click Cells.
• From the Format Cells dialog box displayed, select the Font tab to change the Font, font style, or size.
• Select the Underline: drop down list box to select a style of underline or None to remove the underlining.
• Select the Color: drop down list box to choose a font color.
• In the Effects section, you can tick Strikethrough, Superscript, or Subscript.
• To change all the settings in the dialog box back to the Normal style which is set in the Style dialog box, tick
the Normal font check box.
• Select OK to close the Format Cells dialog box.

The Excel Formatting - Alignment

To align data between the left and right sides of a cell


• Select the cell, or cells, you wish to align.
• On the Excel Formatting toolbar, click on the Align Left icon to align data with the left edge of the cell.
• Click on the Align Right icon to align data with the right edge of the cell.
• Click on the Center icon to center data in the cell.

To align data between the top and bottom of a cell


• Select the cell, or cells, you wish to align.
• From the Format menu, click Cells.
• From the Format Cells dialog box displayed, click on the Alignment tab.
• In the Text alignment section, choose the Top, Center, or Bottom option in the Vertical area to align the
data in the cell.
• To make the lines of data fit evenly within the height of a cell, tick the Justify distributed option and click on
OK.

To change the orientation of data cells


• Select the cell, or cells, you wish to change.
• From the Format menu, click Cells.
• From the Format Cells dialog box displayed, click on the Alignment tab.
• In the Orientation section, you can change the Degrees of the text or use the mouse to drag the 'red small
diamond' up or down. When satisfied, click on OK.
To wrap multiple lines of data in a cell
• Type the data you require into the cell and press Enter. The entry will appear as one long line and select the
cell, or cells, you wish to format.
• From the Format menu, click Cells.
• From the Format Cells dialog box displayed, click on the Alignment tab.
• In the Text control section, tick the Wrap text check box and click on OK.

To shrink the text into one cell


• Type the data you require into the cell and press Enter.
• From the Format menu, click Cells.
• From the Format Cells dialog box displayed, click on the Alignment tab.
• In the Text control section, tick the Shrink to fit check box and click on OK.

To merge several cells


• Select the cells that you wish to merge to become one cell.
• Right-click on the selected cells, click Format Cells.
• From the Format Cells dialog box displayed, click on the Alignment tab.
• In the Text control section, tick the Merge cells check box and click on OK.
Note: You also can use the Merge and Center icon on the Excel Formatting toolbar.

The Excel Formatting - Colors

To change the color of text


• Select the cells containing the data you want to change the color.
• On the Excel Formatting toolbar, click the down arrow next to the Font Color icon.

• Choose a color from the Font Color palette.


• The color you selected from the Font Color palette will be displayed on the new icon face. Click on the icon
face to apply the new color to the cell.

To apply colors to cell(s)


• Select the cell or range of cells you wish to color.
• On the Excel Formatting toolbar, click the down arrow next to the Fill Color icon.
• Choose a color from the Fill Color palette.
To turn off the cell(s) color
• Select the cell or range of cells you wish to color.
• On the Excel Formatting toolbar, click the down arrow next to the Fill Color icon.
• Choose No fill.

The Excel Formatting - Numbers

To change number formatting using the formatting


icons
• You can quickly change the formatting of a cell or selected range by using the following icons on the
Formatting toolbar.

Currency 12345 will become $12,345.00


Percent .25 will become 25%
Comma 98765 will become 98,765.00
Increase Decimal 12,345.00 will become 12,345.000
Decrease Decimal 98,765.00 will become 98,765.0

To format a number as a currency


• Select the cell or range of cells you want to format.
• From the Format menu, click Cells.
• From the Format Cells dialog box displayed, select the Number tab.
• In the Category: section, select Currency.
• Select the number of decimal places you require by using the Decimal places: spin box arrows.
• In the Symbol: section drop down list, select the type of currency.
• Click OK.

To format a number as a percentage


• Select the cell or range of cells you wish to format.
• From the Format menu, click Cells.
• From the Format Cells dialog box displayed, select the Number tab.
• In the Category: section, select Percentage.
• Select the number of decimal places you require by using the Decimal places: spin box arrows.
• Click OK.

To specify a password for opening and modifying a


workbook
• From the File menu, click Save As.
• From the Save As dialog box displayed, click on the Tools icon and from the drop down list displayed, select
General Options.
• From the Save Options dialog box displayed, enter a password into the Password to open: text box. In
future you will be required to enter this password in order to open the file.

• If you enter a password into the Password to modify: text box, this gives others the ability to open, view and
edit a workbook, but not to save it with the same name. They must save a modified version of the workbook with
a different name.
• Click on the OK button. You will be asked to re-type the password to ensure that it is consistent.
Note:
(1) The check box "Always create backup" forces Excel to create a backup copy of the file every time a worksheet
file is saved. The file extension BAK is used, and the backup file is saved in the same folder as the original file.

(2) If the "Read-only recommended" check box is ticked, the following dialog box is displayed when the file is re-
opened.

• Click Yes.
• The file is reopen but with the feature ‘read-only’.
• If you needed to make changes on the worksheet, you cannot save the file with the same file name. So,
changing the file name allows you to save the file.

To remove a password from a workbook


• Open the workbook containing the password you wish to remove (by entering the password when prompted).
• From the File menu, click Save As.
• From the Save As dialog box displayed, click on the Tools icon, and from the drop down list displayed select
General Options.
• From the Save Options dialog box displayed, clear either or both passwords text box.
• Click on the OK button to close the Save Options dialog box.
• Click on the Save button to save the file, which will display a dialog box.
• Click on the Yes button.

To protect a workbook
• From the Tools menu, point to Protection and click on Protect Workbook.
• This will display the Protect Workbook dialog box.

• From the Protect Workbook dialog box displayed, you have two options:

Structure Prevents any changes to the structure of the workbook if checked. i.e. you will be unable to edit,
insert, delete, rename, copy, move or hide sheets.

Windows Prevents changes to the workbooks size. The windows re-sizing controls (close, maximize, minimize
and restore) are hidden.

• In the Password column, you can enter a password (case sensitive). Click OK.
• You will be asked to re-type the password to ensure that it is consistent.
• Click OK.

To unprotect a workbook
• From the Tools menu, point to Protection and click on Unprotect Workbook.
• Enter the required password and click on OK.

To protect a worksheet
• From the Tools menu, point to Protection and click on Protect Sheet.
• This will displays the Protect Sheet dialog box.
• From the Protect Sheet dialog box displayed, you can choose any option from the lists if you ALLOW other
users to modify the checked option in the worksheet.
• In the Password to unprotect sheet: column, you can enter a password (case sensitive). Click OK.
• You will be asked to re-type the password to ensure that it is consistent.
• Click OK.

To unprotect a worksheet
• From the Tools menu, point to Protection and click on Unprotect Worksheet.
• Enter the required password and click on OK.
Step 1: The Chart Wizard (1) – Chart Type
• Click on any cell within the data containing the information that you wish to display as a chart, or highlight the
exact data that you wish to display as a chart.
• Click the Chart Wizard icon on the Standard toolbar. This will display the Excel Chart Wizard as show below:

• From the Chart type: section you can select the type of chart that you wish to create.
• Then from the Chart sub-type: section you can select the exact format that you required for the selected
chart type.
• To see how the selected chart will look, use the Press and Hold to View Sample button within the dialog
box. In our example, we accept the default selection.
• Click the Next button to see the next page of the dialog box - Chart Source Data.

Step 2: The Excel Chart Wizard (2) – Data Source


• The Data Range tab allows you to specify the exact data that you wish to display within your chart.
• You can choose to display Series in Rows or Columns. In the case of the example data used, the two effects
will be as illustrated. Choose the Series in Rows.

• When you click on the Next button, this will display the Chart Options dialog box.

Step 3: The Excel Chart Wizard (3) – Chart Options


From the chart options dialog box displayed, you can select Titles, Axes, Gridlines, Legend, Data Labels and
Data Table tabs and make the necessary changes.

To add title to a chart


• In the Chart title: text box, enter the name for the chart, i.e. Exam results.
• In the Category (X) axis: text box, enter a title for the X axis, i.e. Subject.
• In the Category (Y) axis: text box, enter a title for the Y axis, i.e. Mark score.
• In the example used, the screen will be as illustrated.
To customize the chart axis
• From the Chart Option dialog box displayed, click on the Axes tab.
• It allows you to control the way the axes are displayed, you can tick or un-tick the check box to see the effects
on the chart.

To customize chart gridlines


• From the Chart Option dialog box displayed, click on the Gridlines tab.
• You can choose to display the major and minor X and Y gridlines for the axis by clicking on the particular check
box.

To customize chart legend


• From the Chart Option dialog box displayed, click on the Legend tab.
• You can choose to display or not the chart legend and the placement of the legend in the chart by clicking on
the radio button.

To customize data labels


• From the Chart Option dialog box displayed, click on the Data Labels tab.
• You can choose to display or not the chart data labels by clicking on the radio button.

To display a data table


• From the Chart Option dialog box displayed, click on the Data Table tab.
• You can choose to display or not the chart data table by ticking on the check box.
• Click on the Next button to continue and this will display the final page of the Chart Wizard – Chart Location.

Step 4: The Excel Chart Wizard (4) – Chart Location

To define the chart location


• You can choose to place the chart on an existing worksheet as an object, or you can place it on a new
worksheet. Two options for you to choose:
As new sheet: – It will place the chart in the new worksheet.
As object in: - It will place the chart in the existing worksheet.

• Click on the Finish button and the chart will be created as you have specified during the Chart Wizard
creation process.
Excel Printing - Page Settings
The options that can change here includes the paper orientation, set the page scale and size, and print
quality.

To change Page Setup options


• From the File menu, click Page Setup.
• From the Page Setup dialog box displayed, click on the Page tab.

To set the printing paper orientation


• In the Orientation section, select Portrait or Landscape by clicking the option button.

To set the scale of the page


• In the Scaling section, choose the Adjust to: option button and enter a percentage to scale (in
conjunction with normal size) in the Adjust to spin box.
• Choose the Fit to: option and enter the dimensions of the pages in the wide and tall spin boxes.

To set other printing options


Paper size In the Paper size: drop-down list box, select the size you require.
Print quality In the Print quality: drop-down list box, choose the quality you require (higher dpi –
better quality).
Page numbering To begin page numbering with a different number, select the First page
number: text box and enter the number you want to use.
Excel Printing - Margins Settings
Proper Microsoft Excel printing that involves margins is to set the top, bottom, left and right margins of
the page. You also can choose to center the data of a page.

To change the page margins


• From the Page Setup dialog box displayed, select the Margins tab.

• Click on the Top, Bottom, Left, or Right margin spin box to change the settings.
• To change header and footer margins, click on the Header: or Footer: spin box.
• Click OK.Note: At the bottom Center on page section, you can choose Horizontally or Vertically to
reflect the best position of your data in a page.

Excel Printing - Header/Footer Settings


Proper settings of page header and footer are important as it will affect the overall look of a page in Excel
printing.

To change headers and footers


• From the Page Setup dialog box displayed, select the Header/Footer tab.
• Click on the down arrow to the right of the Header: list box to reveal a list of available headers. Click
on the header required to select it.
• Click on the Custom Header or Custom Footer button to display the Header (or Footer) dialog box.
• In the Left section: box, enter any data you want to appear at the left margin of the header or footer.
• In the Center section: box, enter any data you want to appear at the center of the header or footer.
• In the Right section: box, enter any data you want to appear at the right margin of the header or
footer.
• You also offered the following options:

Format font Click this button after highlighting the text to change the font, size, and style.
Page number Insert the page number of each page.
Number of pages Use this feature along with the page number to create strings such as "page 1 of 15".
Date Add the current date.
Time Add the current time.
File path Add the file path name (location of the file)
File name Add the name of the workbook file.
Tab name Add the name of the worksheet’s tab.
Insert picture Bring up insert picture window and you can choose a location to insert picture.
Format picture Format the inserted picture.

• When you have finished, click on OK.


• Your new header (or footer) will be displayed in the Page Setup dialog box in the Header or Footer
list box.
• Click OK to close the Page Setup dialog box.

Excel Printing - Sheet Settings


In Excel printing, sheet settings is very important as it will control what and where to print of a page. So
make sure you follow the steps here closely.

To change sheet options


• From the File menu, click Page Setup.
• From the Page Setup dialog box displayed, select the Sheet tab.
• Make changes to any of the following:

Print area Enter the worksheet range you want to print, or click on the icon in the right of the text
box and drag through the worksheet areas you wish to print.
Rows to repeat at top Click on the icon in the right of the text box and drag over the rows you wish to
repeat at the top of the page. It enables you to print the selected top row appear on every printing sheet.
Columns to repeat at left Click on the icon in the right of the text box and drag over the columns
you wish to repeat at the left of the page. It enables you to print the selected left columns appear on
every printing sheet.
Elements that will print Tick on the element you wish to print, i.e. Gridlines, Black and White,
Draft Quality, Row and Column Headings (see below).
Page order Select Down, then over, or Over, then down. You only can see the effect if you have
data across a sheet that cannot fit into one printing page.

• More on printing elements (when you tick on the following option):


Gridlines Will print the Excel gridlines.
Black and white Will print the data in blank and white without color.
Draft quality The printing will be in draft quality, not the normal quality.
Row and column headings Will print the worksheet including the row and column headings.

• In the right hand side, there are three buttons:

Options Do necessary adjustment with the printer settings.


Print Preview Preview your worksheet before printing.
Print Print the worksheet.

To change the Excel printing settings


• From the File menu, click Print.
• From the Print dialog box displayed, do the necessary changes as follow:
• From the Printer section, the Name: list box, choose the printer you wish to use.
• In the Page range section, select whether you want to print All pages in a range, or enter the starting
and ending page numbers in the From: and To: spin boxes.
• Select what you want to print in the Print what section, i.e. Selection, Active sheet(s), or Entire
workbook.
• Specify the number of copies you want to print in the Number of copies: spin box.
• Click the Properties button to display the Properties dialog box for the printer.
• Change the options required. The options will vary depending on what type of printer you have.
• Click OK to close the printer properties dialog box.
• Click OK again to start printing the worksheet.

Note: Before hit the OK button, ensure that you have put the plain papers to the printer tray.

GOAL SEEK

Excel's Goal Seek feature allows you to alter the data used in a formula in order to find out what the results will
be.

The different results can then be compared to find out which one best suits your requirements.
1. Enter the following data into the cells indicated:

Cell - Data

D1 - Loan Repayment
D2 - Rate:
D3 - # of Payments:
D4 - Principal:
D5 - Payment:

E2 - 6%
E3 - 60
E4 - $225,000

1. Click on cell E5 and type the following formula:

= pmt ( e2 / 12 , e3 , -e4 )

and press the ENTER key on the keyboard

2. The value $4,349.88 should appear in cell E5. This is the current monthly payment for the
loan.

Altering the monthly payment using Goal Seek

3. Click on the Data tab.

4. Choose What-If Analysis from the ribbon to open the drop down list.

5. Click on Goal Seek... in the list to bring up the Goal Seek dialog box.

6. In the dialog box, click on the Set cell: line.

7. Click on cell E5 in the spreadsheet since we are interested in altering the monthly
payments for this loan.

8. In the dialog box, click on the T0 value: line.

9. Type 3000 since we would like to lower the monthly payment to $3000.00.

10. In the dialog box, click on the By changing cell: line.

11. Click on cell E3 in the spreadsheet since we want to change the monthly payment by
altering the total number of payments to be made.

12. Click OK.

13. At this point, Goal Seek should begin searching for a solution. If it finds one, the Goal Seek
dialog box will inform you that a solution has been found.

14. In this case, the solution is to change the number of payments in cell E3 to 95.25.

15. To accept this solution, click OK in the Goal Seek dialog box and Goal Seek will alter the
data in cell E3.

16. To find a different solution, click Cancel in the Goal Seek dialog box. Goal Seek returns the
value in cell E3 to 60. You are now ready to run Goal Seek again.
PIVOT TABLE

To create a PivotTable report:

1. Select any cell in the source data, and press Ctrl+Shift+* (in Excel 2003, press
this or Ctrl+A).
2. Press Ctrl+F3, and then type the defined Name for the source data.
3. From the Data menu, select PivotTable and PivotChart Report.
4. In Step 1 of 3, select Microsoft Excel list or database, and then click Next.

In Step 2 of 3, in the Range box, press F3 to open the Paste Name dialog box, and
paste the Name of the source data as defined in step 2.

5. Click Next.
6. In Step 3 of 3, click Layout (in Excel 97, go to step 8).
7. In Excel 2002 and Excel 2003, you can skip this step. Instead, click Finish in Step
2 of 3 and then create the PivotTable report by dragging the fields from the Pivot
Table Field List dialog box to the PivotTable report.
8. In the Layout dialog box, drag the Data Fields to the white Data area, and drag all
other fields to the white Page area (except fields that are not going to be used in the
PivotTable report), and then click OK.
9. In Step 3 of 3, click Finish. The PivotTable report is created.
10. Drag Data (in cell A5 in the screenshot) to the right of the PivotTable report to
change the layout from horizontal to vertical.
11. The PivotTable report is now ready to be used. For more details on how to use
the PivotTable report properly, see the other tips in this category.

DATA VALIDATION

1. Select the range of cells you want to use as your data validation values.
2. Choose Name from the Insert menu, and then Define from the submenu.
Excel displays the Define Name dialog box. (Click here to see a related
figure.)
3. Enter a unique name for your data validation range, such as MyValRange,
then click on OK.
4. Select the cell for which you want to define a validation rule.
5. Choose Validation from the Data menu. Excel displays the Data Validation
dialog box. (Click here to see a related figure.)
6. Use the Allow and Data drop-down lists to specify how you want Excel to
validate the data. Depending on your selections, you will see a Value,
Minimum, or Maximum boxes appear in the dialog box.
7. In the appropriate boxes (Value, Minimum, or Maximum), specify the
name you gave your data validation range, in step 3. For instance, you
could enter MyValRange.
8. Click on OK.
This approach works great if the data validation range is in the same workbook. What if
you want to use a data validation range that is in a different workbook entirely? You can
trick Excel into accepting your external reference if, in step 7, you enter a formula such
as the following:

=INDIRECT("[Book2]Sheet1!D6")

This formula uses the INDIRECT function to return the value at a cell on another
worksheet, and the data validation feature will accept it with no problems. In this case the
cell being checked is at cell D6 on Sheet1 of Book2. In order for this to work, you will
need to make sure that Book2 is open at the same time that your main workbook is open.

SOLVER

Setting up the problem

The first step in using the Solver command is to build a Solver-friendly worksheet. This involves creating a

target cell to be the goal of your problem—for example, a formula that calculates total revenue—and

assigning one or more variable cells that the Solver can change to reach your goal. Your worksheet can also

contain other values and formulas that use the target cell and the variable cells. In fact, for the Solver to do

its job, each of your variable cells must be precedents of the target cell. (In other words, the formula in the

target cell must reference and depend on the variable cells for part of its calculation.) If you don’t set it up

this way, when you run the Solver you’ll get the error message, “The Set Target Cell values do not

converge.”

Figure 1 shows a simple worksheet that we can use to estimate the weekly revenue for our example coffee

shop and to determine how many cups of each type of coffee we will need to sell. The worksheet in the

figure appears in Formula Auditing mode, which was enabled by choosing Tools, Formula Auditing,

Formula Auditing Mode. Cell G4 is the target cell that calculates the total revenue that the three coffee
drinks generate. The three lines that converge in cell G4 were drawn by selecting that cell and choosing

Tools, Formula Auditing, Trace Precedents. The arrows show how the formula in cell G4 depends on

three other calculations for its result. (To remove the arrows, choose Tools, Formula Auditing, Remove All

Arrows.)

The three variable cells in the worksheet are cells D5, D9, and D13—these are the blank cells whose values

we want the Solver to determine when it finds a way to maximize our weekly revenue.

Note The workbook used in this example, Solver.xls, is included in the sample files download.

In the bottom-right corner of our screen is a list of constraints we plan to use in our forecasting. A constraint

is a limiting rule or guiding principle that dictates how the business is run. For example, because of storage

facilities and merchandising constraints, we’re currently able to produce only 500 cups of coffee (both

regular and premium) per week. In addition, our supply of chocolate restricts the production of caffe mochas

to 125 per week, and a milk refrigeration limitation restricts the production of premium coffee drinks to 350

per week.

Figure 1: The commands on the Tools, Formula Auditing submenu help you visualize the relationship

between cells. Here the target cell depends on three other cells, each of which contains a formula.

These constraints structure the problem, and we’ll enter them in a special dialog box when we run the Solver

command. Your worksheet must contain cells that calculate the values used as constraints (in this example,

G8, G7, and D13). The limiting values for the constraints are listed in cells G11 through G13. Although listing

the constraints isn’t necessary, it makes the worksheet easier to follow.


If your Solver problem contains several variables and constraints, you’ll find it easiest to enter data if you

name key cells and ranges in your worksheet by using the Insert, Name, Define command. Using cell names

also makes it easy to read your Solver constraints later.

Running the Solver

After you’ve defined your forecasting problem in the worksheet, you’re ready to run the Solver add-in. The

following steps show you how to use the Solver to determine the maximum weekly revenue for your coffee

shop given the following constraints:

No more than 500 total cups of coffee (both regular and premium)

No more than 350 cups of premium coffee (both caffe latte and caffe mocha)

No more than 125 caffe mochas

In addition to telling you the maximum revenue, the Solver calculates the optimum distribution of coffees in

the three coffee groups. To use the Solver, complete the following steps:

1. Click the target cell—the one containing the formula that’s based on the variable cells you want

the Solver to determine. In our example, as shown in Figure 1, the target cell is G4.

2. Choose Tools, Solver. The Solver Parameters dialog box will open, as shown here:

3. If the Set Target Cell text box doesn’t already contain the correct reference, select the text box

and then click cell G4 to insert $G$4 as the target cell.

4. Select the Max option following the Equal To label, because you want to find the maximum

value for the target cell.


5. Click the button at the right end of the By Changing Cells text box to collapse the dialog box.

Select each of the variable cells. If the cells adjoin one another, simply select the group by dragging

across the cells. If the cells are noncontiguous, as in our example, hold down the Ctrl key and click

each cell (this will place commas between the cell entries in the text box).

For our example, select cells D5, D9, and D13 (the three blank cells reserved for the number of cups

of coffee that need to be sold in each category), which will place the following value in the By

Changing Cells text box: $D$5,$D$9,$D$13, as shown here:

Tip: Use the Guess button to preview the result

If you click the Guess button, the Solver tries to guess at the variable cells in your forecasting

problem. The Solver creates the guess by looking at the cells referenced in the target cell formula.

Don’t rely on this guess, though—it’s often incorrect!

6. Constraints aren’t required in all Solver problems, but this problem has three. Click the Add

button to add the first constraint using the Add Constraint dialog box.

The first constraint is that you can sell only 500 cups of coffee in one week. To enter this constraint,

click cell G8 (the cell containing the total cups formula), select <= in the operator drop-down list, and

with the insertion point in the Constraint text box, click G11 or type Max_cups, using the underline

character to link the words. (Max_cups is the name of cell G11 in our example.) The Add Constraint

dialog box should look like this:


When you’re done, click the Add button in the Add Constraint dialog box to enter the first constraint.

Note You have the option of typing a value, clicking a cell, or entering a cell reference or name in the

Constraint text box. If you click a cell that has a defined name, Excel will use that name when you

add the constraint.

7. Define the second constraint—you can sell only 350 premium coffees in one week. With the

insertion point in the Cell Reference text box, click cell G7 (the cell containing the premium cups

formula), select <= in the operator drop-down list, and in the Constraint text box, type Max_premium

(the name of cell G12) or click cell G12. When you’re finished, click the Add button to enter the

second constraint.

8. Define the third constraint—you can sell only 125 caffe mochas in one week. Click cell D13 (the

variable cell containing the number of mocha cups), select <= in the operator drop-down list, and in

the Constraint text box, type Max_mocha (the name of cell G13) or click cell G13.

9. Click the OK button in the Add Constraint dialog box to display all three constraints in the

Solver Parameters dialog box. It should look like the one shown here:
To modify one of the constraints that appears in the Solver Parameters dialog box, select the

constraint and click the Change button. To customize the iteration and calculation parameters in the

Solver utility, click the Options button and make your adjustments.

10. Your forecasting problem is ready to go, so click the Solve button to calculate the result.

After a brief pause the Solver will display the Solver Results dialog box describing how the

optimization analysis went. If the Solver runs into a problem, you’ll see an error message, and you can

click the Help button to learn more about the difficulty. If the Solver finds a solution, you see the

following dialog box:

11. To display the new solution in your worksheet, select the Keep Solver Solution option in the

Solver Results dialog box and then click the OK button. The Solver will place an optimum value in

the target cell and will fill the variable cells with the solutions that best match the constraints you

specified, as shown in Figure 2.

In this example, you’ve learned that if you’re limited to selling 500 cups of coffee per week, you can expect a

maximum of $918.75 in revenue and your optimum drink distribution is 150 cups of regular coffee, 225 cups

of caffe latte, and 125 cups of caffe mocha. Although this financial model doesn’t consider several realistic

business variables, such as the costs associated with running a shop and the benefits of making volume

purchases, it does help you to forecast much more easily and quickly than you could using pencil and paper.
Figure 2: When the Solver finishes, the values that produce the optimum result in the target cell will appear in the variable cells.

Maximum revenue

Three variables that represent the mix of drink quantities for maximum return, given the constraints

Editing your Solver forecast

Perhaps the best feature of a Solver forecast is that you can easily edit it to evaluate new goals and

contingencies. For example, if you decide that you want to earn exactly $700 per week from coffee drinks,

you can use the Solver to tell you what the optimum combination of drinks would be. Setting a target value in

the Solver is a little like using the Goal Seek command to determine a value for an unknown variable,

although with Solver you can use more than one variable.

To edit the Solver forecast you created in the previous exercise to find the variables needed to reach a

specific goal, follow these steps:

1. Activate the worksheet in which you previously used the Solver. In the variable cells, leave the

values that were generated by the Solver in the previous exercise (namely, 150 in D5, 225 in D9, and

125 in D13).

2. Choose Tools, Solver. The Solver Parameters dialog box will appear, still displaying the

target, variables, and constraints from your last Solver problem. You’ll adjust these to compute a new

forecasting goal.
3. Select the Value Of option and type 700 in the text box to the right. The Value Of option sets

the target cell to a particular goal so that you can determine the variable mix you need to reach your

milestone. (In this example, the variable cells represent the numbers of cups of different types of

coffee.) Your dialog box should look like this:

4. Click the Solve button to find a solution to your forecasting problem. When the Solver has

finished, click the OK button in the Solver Results dialog box.

Figure 3 shows the solution the Solver generates if, before you ran the Solver, the variable cells had

contained the values that were generated in the previous exercise (namely, 150, 225, and 125). The new

Solver results indicate that you can make $700 by selling 100 mochas, 175 lattes, and 100 regular coffees.

Figure 3: When you specify a target goal, the Solver computes an optimum product mix that meets your constraints.
What if there is more than one solution to the problem?

In the previous example, the Solver determined that you could sell 100 mochas, 175 lattes, and 100 regular

coffees to reach your sales goal of $700. But you can also reach the $700 mark using a different product

mix; for example, you could sell 94 regular coffees, 151 lattes, and 125 mochas to reach $700. (Using this

mix, your revenue would actually be $700.75.) So, how did the Solver decide what the optimum product mix

would be? The Solver simply started with the current numbers in the variable cells and adjusted them until it

found an acceptable solution (subject to the constraints described in the previous example). This is why, if

you use different starting values in the variable cells before you run the Solver, you can get different results

from a problem with multiple solutions.

What if Solver reaches its iteration limit without finding a solution?

The starting values in the variable cells can affect the solution: Solver might fail to find a solution or it might

time out before reaching a solution. Enter values in variable cells that fall close to what you believe the final

values will be. If Solver still reaches its iteration limit without arriving at a solution, you can adjust the starting

values and restart or click Continue to use the maximum solution time. You can adjust both the maximum

iterations and maximum time by using the Options button in the Solver Parameters dialog box.

If you would like to use a particular product mix, you can take advantage of the way the Solver reaches its

results. Enter the values that you think might be acceptable in the variable cells before you run the Solver,

and Excel will use those as starting values when it computes the solution.

Anda mungkin juga menyukai