microsoft excel

246
Microsoft Excel 1 XP Microsoft Excel Mohan Bang Mohan Bang

Upload: mohan-bang

Post on 06-May-2015

1.080 views

Category:

Software


5 download

DESCRIPTION

Microsoft Excel

TRANSCRIPT

Page 1: Microsoft Excel

Microsoft Excel 1

XP

Microsoft Excel

Mohan BangMohan Bang

Page 2: Microsoft Excel

Microsoft Excel 2

XPAgenda: Discussion on Microsoft

Excel

1. Developing a Professional Looking Worksheet

2. Working With Charts and Graphs

3. Working With Excel Lists

4. Working With Multiple Worksheets and

Workbooks

5. Working With Excel’s Editing and Web Tools

6. Developing an Excel Application

7. Importing Data Into Excel

8. Excel Shortcut keys and Cheat Sheet

Page 3: Microsoft Excel

Microsoft Excel 3

XP

Microsoft Excel

1 – Developing a Professional Looking Worksheet

Page 4: Microsoft Excel

Microsoft Excel 4

XPOpen the Format Cells dialog box

• Formatting is the process of changing the appearance of your workbook.

• A properly formatted workbook can be easier to read, appear more professional, and help draw attention to important points.

• The formatting toolbar is the fastest way to format your worksheet.

• With buttons on this toolbar, you can apply a comma format, adjust the number of decimal places in a number, apply Currency and Percent formats and even quickly copy formats.

• If you select a cell or range, click Format on the menu bar and then click Cells, the Format Cells dialog box opens.

Page 5: Microsoft Excel

Microsoft Excel 5

XPThe Format Cells dialog box

The Format Cells dialog box has six tabs, each dedicated to a different set of format properties.

The Font tab will be used to format the font, size and style of text in your worksheets.

Page 6: Microsoft Excel

Microsoft Excel 6

XPFormat data using different fonts, sizes and font styles

• A font is the design applied to letters, characters and punctuation marks. Each font is identified by a font name or type face.

• Fonts can be displayed in various sizes and you can even change the color of the font or the background color in the cell.

• These options are available in the Format Cells dialog box and there are also buttons available for the formatting toolbar to make formatting faster.

Page 7: Microsoft Excel

Microsoft Excel 7

XPExamples of various formats

Excel, by default, will format all your entries using a style called the General format.

This figure shows examples of some items formatted with the General format.

You can also see the Percent Style and Currency Style applied to various cells.

Page 8: Microsoft Excel

Microsoft Excel 8

XPCopy existing formats to other cells

• One way to copy a format is to use the Format Painter button. To use the Format Painter:– Select a cell, then click the Format Painter button, which has a

picture of a paintbrush on it – Select the cell or range you wish to format and the operation is

complete

• Another way to copy a format is to drag the fill handle and click the Auto Fill Options button, then click the Fill Formatting Only option.

• Another way to format cells is through the Format Cells dialog box.

Page 9: Microsoft Excel

Microsoft Excel 9

XPAlign cell contents

• When you enter numbers and formulas into a cell, Excel automatically aligns them with the cell's right edge and bottom border, while text entries are aligned with the left edge and bottom border.

• You can control the alignment of data within a cell horizontally and vertically.

• Left, Right and Center alignments can be selected using their respective alignment buttons on the Formatting toolbar.

• To align the cell's contents vertically, open the Format Cells dialog box and choose the vertical alignment options on the Alignment tab.

Page 10: Microsoft Excel

Microsoft Excel 10

XPAlign using Merge and Center

• Another option available for alignment in the Format Cells dialog box and on the Format toolbar is the Merge and Center option, which centers text in one cell across a range of cells.

• If you want to fit a lot of text within a cell but without having to expand the column width to be very large, you can use the text wrapping option on the Alignment tab, or even choose to indent text.

• You can also have Excel shrink the text to fit within the given column width you have chosen or even rotate text from -90 to +90 degrees.

Page 11: Microsoft Excel

Microsoft Excel 11

XPThe Alignment tab of the Format Cells dialog box

The Alignment tab provides many options for aligning data.

Click the check boxes to select these options.

Rotate text by moving the arrow with the mouse, or specify the number of degrees in the text box.

Page 12: Microsoft Excel

Microsoft Excel 12

XPExamples of text formatting

This column header shows an example of text wrapping.

The text in column A is indented.

Page 13: Microsoft Excel

Microsoft Excel 13

XPAdd cell borders and backgrounds

• Excel provides a range of tools to format not only the contents of a cell, but also the cells themselves.

• The gridlines you see in Excel in a new worksheet are not displayed on printed pages.

• You can add a border to a cell using either the Borders button on the Formatting toolbar or the options on the Border tab in the Format Cells dialog box.

Page 14: Microsoft Excel

Microsoft Excel 14

XPThe Borders button versus the Border tab

• When you click the list arrow for the Borders button, a Borders palette appears showing common choices as well as a Draw Borders button at the bottom of the Border palette gallery.

• The Borders button allows you to create borders very quickly, whereas the Format Cells dialog box allows you to refine your choices further.

• The Border Tab in the Format Cells dialog box is especially useful for controlling how a block of cells or a range appears with borders.

• You have the option to change the outermost top, bottom and sides of the range independently, as well as determine different borders for the lines separating the cells inside the range's grid.

Page 15: Microsoft Excel

Microsoft Excel 15

XPAdd patterns or colors to cells

• Patterns and colors can be used to enhance the appearance of spreadsheet cells.

• The fastest way to apply background color to cells in the worksheet is by clicking the list arrow of the Fill color button and choosing a color from the palette.

• To apply a fill pattern to cells, use the Patterns tab on the Format Cells dialog box.

Page 16: Microsoft Excel

Microsoft Excel 16

XPThe Border tab of the Format Cells dialog box

The Border tab of the Format Cells dialog box gives you complete control over the border you want to create for a cell, range of cells, or the entire worksheet.

Click a button to turn on or turn off the border for the indicated area.

Page 17: Microsoft Excel

Microsoft Excel 17

XPThe Patterns tab of the Format Cells dialog box

Using the Patterns tab of the Format Cells dialog box, not only can youchange the background color of the worksheet, but also you can select from a palette of patterns, as shown in the figure to the right.

The color palette on the Patterns tab is the same one that is also available from the list arrow of the Fill Color button.

Page 18: Microsoft Excel

Microsoft Excel 18

XPA worksheet with formatting applied

Certain background patterns can overwhelm the text in some cells, so you can improve the appearance by changing the color of the pattern itself to a lighter color if you are using standard black text.

This figure shows how you might use borders, background colors and patterns to improve the appearance of a worksheet.

Page 19: Microsoft Excel

Microsoft Excel 19

XPMerge a range of cells

• To merge a range of cells into a single cell:– Use the Merge option on the Alignment tab in the

Format Cells dialog box– Click the Merge and Center button on the Formatting

toolbar

• To split a merged cell back into individual cells:– Select the merged cell – Click the Merge and Center button again– Or uncheck the Merge Cells check box on the

Alignment tab in the Format Cells dialog box

Page 20: Microsoft Excel

Microsoft Excel 20

XPHide rows and/or columns

• You can hide rows or columns, which does not affect the data stored there, nor does it affect any cell that might have a formula reference to a cell within the hidden row or column.

• To hide a row or column:– Select the row or column and then choose Hide from either the

Row or Column option of the Format menu, or, from the shortcut menu that pops up when you right click the row or column heading

• To unhide a row or column:– Select the headings of the rows or columns that border the hidden

area, then choose Unhide from either the Row or Column option of the Format menu, or, from the shortcut menu that pops up when you right click the row or column heading

Page 21: Microsoft Excel

Microsoft Excel 21

XPMerge headings across multiple cells

This figure shows a sample worksheet with a boldfaced title in the first row mergedand centered across the columns used for data.

The Merge and Center button is the fastest way to merge several cells into one or to split one merged cell back into several cells

Page 22: Microsoft Excel

Microsoft Excel 22

XPWorksheet with hidden cells

This figure shows the same worksheet that was shown in the previous slide, but it has now had several cells hidden. Hiding extraneous cells can frequently improve the overall appearance of the worksheet.

Page 23: Microsoft Excel

Microsoft Excel 23

XPFormat the worksheet background and sheet tabs

• You can use an image file as a background for a worksheet.

• Images can be used to give the background a textured appearance, like that of granite, wood, or fibered paper.

• The background image does not affect the format or content of any cell in the worksheet, and if you have already defined a background color for a cell, Excel displays the color on top, hiding that portion of the image.

• You cannot apply a background image to all the sheets of the workbook at the same time.

Page 24: Microsoft Excel

Microsoft Excel 24

XPInsert a background image and change a worksheet tab color

• To add a background image to a worksheet:– Click Format on the menu bar, point to Sheet and click

Background – Locate and select an image from your hard drive, floppy drive,

network, etc., and click the Insert button • You can also format the background color of the

worksheet tabs, but this color is only visible when the worksheet is not the active sheet in the workbook. – Right click the tab you want to change and choose Tab color from

the shortcut menu – Select a color from the color palette, click the OK button, and then

click on a different tab in order to see the color displayed on the changed tab

Page 25: Microsoft Excel

Microsoft Excel 25

XPA worksheet with a background image

This figure shows a worksheet with a background image added, creating a textured background.

Page 26: Microsoft Excel

Microsoft Excel 26

XPFind and replace formats within a worksheet

• The Undo button on the Standard toolbar is very useful for removing formatting choices you have decided you do not want to use.

• You can also clear the formatting of selected cells, returning them to their initial, unformatted appearance. – To clear formatting, select a cell or range, click Edit on

the menu bar, point to Clear and then click Formats

Page 27: Microsoft Excel

Microsoft Excel 27

XPUse Find and Replace to change formats

• Click Edit on the menu bar and then click Replace. • When the Find and Replace dialog box opens, click the

Options >> button to expand the box and display additional find and replace options.

• Click on the Replace tab and then click the topmost Format button to open a Find Format dialog box, select the format combinations you want to search for, then click the OK button.

• Click the lower Format button and when the dialog box opens, select the options you want to use for replacing the formatting.

• Click the OK button and then the Replace All button to quickly change all the cells that meet your Find Format criteria.

Page 28: Microsoft Excel

Microsoft Excel 28

XPDialog boxes used for Find and Replace operations

The Find and Replace dialog box.

The Find Format dialog box.

Page 29: Microsoft Excel

Microsoft Excel 29

XPCreate and apply styles

• If you have several cells that use the same format, you can create a style for those cells.

• A style is a saved collection of formatting options: number formats, text alignment, font sizes and colors, borders, and background fills.

• If you modify the specifications for a style, the appearance of any cell associated with that style would be automatically changed to reflect the new style.

• To create a style, click on a cell that has formatting applied to it and this formatting becomes the basis of the new style you want to create.

Page 30: Microsoft Excel

Microsoft Excel 30

XPCreate a style using the Style dialog box

• Click Format on the menu bar, and then click Style. The Style dialog box opens and all the formatting options associated with the active cell are listed.

• Give the style a name, and then modify the formatting options by removing or adding to the existing ones listed in the dialog box. Click the OK button to create a style with a specific name.

• To apply a style within a worksheet, first select the cells you want associated with the style, then open the Style dialog box, choose the style name from the list arrow and then click the OK button.

• When you create a style, you can also click the Merge button in the Style dialog box to merge a style with those from other open workbooks.

Page 31: Microsoft Excel

Microsoft Excel 31

XPThe Style dialog box

The Style dialog box allows you to create, name and customize styles.

You can also copy styles from one workbook to another. Copying styles allows you to create a collection of workbooks that share a common look and feel.

Page 32: Microsoft Excel

Microsoft Excel 32

XPApply an AutoFormat to a table

• You can apply a professionally designed format to your worksheet by choosing one of 17 predefined formats from the AutoFormat gallery.

• To apply an AutoFormat to a table:– Select a range that has a table of information in it – Click Format on the menu bar, click AutoFormat and the

AutoFormat dialog box opens. Scroll through the gallery to view different table formats, click on one you want to try, and then click the OK button.

– Click on a cell outside of your selected range to remove the highlighting from your table so you can see what it looks like with the AutoFormat design applied.

Page 33: Microsoft Excel

Microsoft Excel 33

XPThe AutoFormat style gallery

This figure shows some of the AutoFormats available for use.

The designs in the AutoFormat gallery are very useful. You can either employ the professional design that Excel provides you, or simply use it as a startingpoint to apply a design that is close you what you want, which you can then modify to fit your own needs.

Page 34: Microsoft Excel

Microsoft Excel 34

XPFormat a printout using Print Preview

• Open a Print Preview window by clicking the Print Preview button on the Standard toolbar.

• Excel will display the preview as a full page, which may be difficult to read.

• Click the Zoom button on the Print Preview toolbar, or pass your mouse over the page, and the pointer changes to the shape of a magnifying glass. When you click any portion of the page Excel will zoom in. Zoom out using the same methods.

• By clicking the Setup button on the Print Preview toolbar, you can change margins, orientation, center the page or set several other formatting and printing features.

• You can also open the Page Setup dialog box by selecting that option from the File menu.

Page 35: Microsoft Excel

Microsoft Excel 35

XPThe Margins tab of the Page Setup dialog box

The Page Setup dialog box controls how a worksheet is placed on a page for printing.

You can adjust the size of the margins, which are the spaces between the page content and the edge of the page. Most printers require a minimum margin.

Page 36: Microsoft Excel

Microsoft Excel 36

XPCreate a header and footer for a printed worksheet

• A header is text printed within the top margin of every worksheet page and a footer is printed within the bottom margin of every page.

• Headers and footers can add important information to your printouts.

• Excel tries to anticipate headers and footers and provides several preformatted options in list boxes on the Header/Footer tab of the Page Setup dialog box.

• Click the list arrow for these header and footer options and select one of Excel's suggestions or create your own by choosing the Custom Header or Custom Footer buttons on the Header/Footer tab.

Page 37: Microsoft Excel

Microsoft Excel 37

XPThe Header dialog box

This figure shows the Header dialog box. This dialog box presents the same options as the Footer dialog box.

You can type in any text you like and use the Font button to format the text just as you would in a worksheet cell. The other Header/Footer formatting buttons provide some common actions using built-in Excel formatting codes.

Page 38: Microsoft Excel

Microsoft Excel 38

XPDefine a print area and add a page break to a printed worksheet

• By default, Excel prints all parts of the active worksheet that contain text, formulas, or values.

• You can define a print area that contains only the content that you want to print.

• To define a print area, select the range you want to print, click File on the menu bar, point to Print Area, and then click Set Print Area.

• You can also specify different sections of your worksheet to print on separate pages. – Insert a page break by clicking on a cell, clicking Insert on the

menu bar, and then clicking Page Break

Page 39: Microsoft Excel

Microsoft Excel 39

XPThe Sheet tab of the Page Setup dialog box

The Page Setup dialog box can specify cells that will repeat on each page, print gridlines, and whether to print or not to print headings on each page.

Page 40: Microsoft Excel

Microsoft Excel 40

XP

Microsoft Excel

2 – Working With Charts and Graphs

Page 41: Microsoft Excel

Microsoft Excel 41

XPCreate column and pie charts in Excel

• Charts, or graphs, provide visual representations of the workbook data.

• A chart may be embedded in an existing worksheet, or can be created on a separate chart sheet, with its own tab in the workbook.

• You can use Excel’s Chart Wizard to quickly and easily create charts.

• The Chart Wizard is a series of dialog boxes that prompt you for information about the chart you want to generate

Page 42: Microsoft Excel

Microsoft Excel 42

XPCreate a chart usingthe Chart Wizard

• To create a chart with the Chart Wizard:– Select the data you want to chart, which will be your data source

– Click the Chart Wizard button on the standard toolbar

– In the first step of the chart wizard, select the chart type and sub-type

– In the second step of the Chart Wizard, make any additions or modifications to the chart's data source

– In the third step, make any modifications to the chart's appearance

– In the fourth and final step, specify the location for the chart, then click the OK button

Page 43: Microsoft Excel

Microsoft Excel 43

XPChart Wizard dialog box 1

Choose a chart type and view examples of that type in dialog box 1.

Choose which type of chart you want in this pane.

Select a sub-type of that chart in this pane.

Click and hold this button down to see a preview of your chart.

Page 44: Microsoft Excel

Microsoft Excel 44

XPChoosing a data series

• You can alter the data source during step 2 of the Chart Wizard and also choose whether to organize the data source by rows or by columns.

• The data source is organized into a collection of data series. – A data series consists of data values, which are plotted on the

chart's vertical, or Y-axis – The data series’ category values, or X values, are on the horizontal

axis, called the X-axis

• A chart can have several data series all plotted against a common set of category values.

Page 45: Microsoft Excel

Microsoft Excel 45

XPChart Wizard dialog box 2

During the second step of the Chart Wizard, you specify the data to be displayedin the chart, which is also known as the chart's data source.

Specify the cell range and whether the data series is in rows or columns.

Page 46: Microsoft Excel

Microsoft Excel 46

XPModify the appearance of a chart

• The plot area contains data markers, examples of which include the columns of a column chart, pie slices in a pie chart, or the points used in an XY (scatter) chart.

• An axis covers a range of values, called a scale. • The scale is displayed by placing values alongside the

axes. • A chart may also contain gridlines by extending the tick

marks into the plot area. • Whenever there are several data series for a chart, a legend

can be placed next to the plot area to uniquely identify each series with a different color or pattern.

Page 47: Microsoft Excel

Microsoft Excel 47

XPChart Wizard dialog box 3

The third step of the Chart Wizard provides some options for controlling the appearance of the chart.

Page 48: Microsoft Excel

Microsoft Excel 48

XPChart Wizard dialog box 4

The final step is to choose the location of the chart. The chart can be saved as an embedded chart into the current worksheet, or, create a new sheet called a chart sheet that contains only the chart. Both options are shown below.

Page 49: Microsoft Excel

Microsoft Excel 49

XPResize and move an embedded chart

• An embedded chart is an object that you can move, resize or copy.

• Select the embedded chart to make it active; the selection handles will appear. To resize the chart:– Drag the selection handles to increase or decrease the size of the

chart – To keep the chart proportions the same as you resize, hold the

Shift key as you drag one of the selection handles – To move the chart, make it active and then move the pointer over a

blank area. Click and drag the embedded chart to the new location and release the mouse button

Page 50: Microsoft Excel

Microsoft Excel 50

XPMoving and resizing tips

• When you select the chart to make it active, be sure you have clicked the entire chart, and not just one of its elements. – You will be able to tell by the selection handles, which will appear

at the outermost edges of the chart• When you move the pointer over a blank area of the chart

after you have selected it, you should see the label Chart Area appear.

• These tips will help you select and move the entire chart, and not just one of its elements.

Page 51: Microsoft Excel

Microsoft Excel 51

XPA selected embedded chart

This figure shows an embedded chart that has been selected, resized and moved beneath its data source.

A chart is linked to the data in the worksheet. If you change data in the worksheet that appears on the chart, Excel will automatically update the chart with the new information. This is the case for data values and also category labels.

Page 52: Microsoft Excel

Microsoft Excel 52

XPCreate a chart sheet

• Create a chart sheet by using the two options in the fourth step of the Chart Wizard:– One option lets you place the new chart as an object in

any existing sheet, which you can select from a drop down list box

– The other option is to place the chart as a new sheet, which is called a chart sheet

• When you select this option, the chart will appear in a new worksheet with its own tab in the workbook.

Page 53: Microsoft Excel

Microsoft Excel 53

XPCreate a pie chart

• Pie charts are very useful for comparing values in a data series to each other, but can only use one data series at a time.

• One feature of a pie chart is called exploding, in which you can slightly separate a particular pie slice from the other slices.

• You can explode any or all of the slices of the pie. This is referred to as an exploded pie chart.

• Exploding a pie chart adds emphasis to a particular area of the chart and makes it easier to notice.

Page 54: Microsoft Excel

Microsoft Excel 54

XPExplode a pie chart

• You can explode all of the slices by selecting the entire pie itself so that all the individual pieces have selection handles.

• As you click and drag any portion, all the slices of the pie will explode outward from each other.

• When the pie is exploded out to the size you desire, release the mouse button.

• A fully exploded pie chart is also one of the sub-type options of the pie chart type that you will see when you use the Chart Wizard.

Page 55: Microsoft Excel

Microsoft Excel 55

XPA pie chart with an exploded slice

This area of the pie has been selected and drawn away, or exploded, from the rest of the pie.

You can also rotate a pie chart by double-clicking the pie to open the Format Data Series dialog box and setting options to rotate the chart by a specified number of degrees.

Page 56: Microsoft Excel

Microsoft Excel 56

XPModify the properties of your charts

• After you create a chart, you can edit the data that is used in the chart by changing it in the data source worksheet cells.

• If you wanted to remove a data series from all categories, you could delete that particular data series from the worksheet in many cases.

• If you want to remove a slice of a pie chart, you cannot just delete the data in the data source, but rather you must change the cell reference of the data series for the chart.

Page 57: Microsoft Excel

Microsoft Excel 57

XPModify a pie chart

• Make the pie chart active and then click Chart on the menu bar. • Click Source Data. Edit the series in this dialog box, or click the

Collapse Dialog button to temporarily collapse the dialog box so you can drag the pointer over a new range of cells.

– Whatever you select will replace the existing range listed in the current data series you are editing

• You can then expand the dialog box again with the Expand Dialog button, make other changes as desired, and click the OK button.

• To move an embedded chart to a new chart sheet, select the chart, click Chart on the menu bar and click Location. The same dialog box of Step 4 of the Chart Wizard will appear and you can click the option to place the chart as a new sheet and give it a name.

Page 58: Microsoft Excel

Microsoft Excel 58

XPUse the Chart menu to modify charts

• All of the dialog boxes used in the Chart Wizard are available through the Chart menu.

• Step 1 of the Wizard, the chart type, is available on the Chart menu as the option Chart Type.

• Step 2 of the Chart Wizard, the data source, is available on the Chart menu as the option Source Data.

• Step 3 of the Wizard is also available on the Chart menu as Chart Options.

• Step 4 of the Wizard is shown as Location on the Chart menu.

• Some problems, such as overlapping labels that are too difficult to read, have to be corrected by formatting the individual elements within the chart.

Page 59: Microsoft Excel

Microsoft Excel 59

XPFormat chart elements

• To format an individual chart element, select the element by clicking it and then format its appearance using the same tools on the Formatting toolbar you used to format worksheet cells.

• You can also double-click the chart element to open a dialog box containing formatting options, or right-click the element and then select the Format command from the shortcut menu to open the dialog box.

• There are three basic types of text in an Excel chart: – Label text – Attached text– Unattached text

Page 60: Microsoft Excel

Microsoft Excel 60

XPExcel chart text types

• Label text includes category names, tick mark labels, and legend text, which is linked to or derived from cells in the worksheet.

• Attached text is not linked to any cells in the worksheet; examples include the chart title and the axes titles.

• Unattached text is any additional text that you want to include in the chart.

Page 61: Microsoft Excel

Microsoft Excel 61

XPFormat colors and patterns

• To work with colors and fills, double-click an element and the Format Data Series dialog box opens.

• You can use options provided on the Patterns tab to change both the border style and the interior of a data marker.

• You can also edit an axis scale by double-clicking any value on an axis to open the Format Axis dialog box.

• In the Format Data Series dialog box, the Pattern tab includes a Fill Effects button that provides a full range of options to create sophisticated colors and patterns, such as gradient, texture or even a picture.

Page 62: Microsoft Excel

Microsoft Excel 62

XPThe Fill Effects dialog box

The Fill Effects dialog box can be opened from the Pattern tab of the Format Data Series dialog box. You can specify many options to customize the appearance of many chart elements.

Page 63: Microsoft Excel

Microsoft Excel 63

XPAdd a graphic to a chart

• You can set a graphic image as a background for a chart using options on the Picture tab of the Fill Effects dialog box.

• This can be done for a data marker, but is often more appropriate for a larger portion of the chart itself, such as the plot area.

• You could also place graphics within the data markers, such as the columns in a Column chart.

• The Fill Effects dialog box options for inserting a picture are the same for data markers as they are for other areas of the chart.

• You can choose to stretch the graphic over the entire size of the column, or choose to stack the graphic up to the height of the column.

Page 64: Microsoft Excel

Microsoft Excel 64

XPChange the axis scale

• There are four values that comprise the y-axis scale: the minimum, maximum, major unit, and minor unit.

• The minimum and maximum values are the smallest and largest tick marks that will appear on the axis.

• The major unit is the increment between the scale's tick marks.

• The chart has a second set of tick marks, called the minor tick marks, which may or may not be displayed; if shown, their positioning is determined by the minor unit setting.

• Major tick marks are displayed alongside an axis value, whereas minor tick marks, if present, are not alongside an axis value.

Page 65: Microsoft Excel

Microsoft Excel 65

XPThe Scale tab of the Format Axis dialog box

The Scale tab of the Format Axis dialog box is shown in this figure. The x-axis addresses categories, not values, so there are no units to set for this axis.

Page 66: Microsoft Excel

Microsoft Excel 66

XPCreate 3-D charts

• To create a 3-D chart, you may choose to do so during the first step of the Chart Wizard, as three-dimensional charts are sub-types of most other charts, such as the pie chart.

• To change a chart to a 3-D chart, select the chart, click Chart on the menu bar, and then click Chart Type.

• Choose the 3-D option sub-type of whichever chart type you prefer.

• There are also several 3-D charts on the Custom Types tab of the Chart Type dialog box.

Page 67: Microsoft Excel

Microsoft Excel 67

XPModify 3-D chart options

• A 3-D chart has several options for modifying the 3-D effect. – Perspective is the illusion that parts of the 3-D chart that are farther away

from you decrease in size– Elevation is the illusion that you are looking at the 3-D chart from some

particular height—either above or below the chart – You may also rotate the 3-D chart to bring different parts of the chart to

the forefront • Elevation and rotation are options that you can change with the 3-D

View dialog box, available from the Chart menu.• Excel creates each 3-D chart with a default elevation, rotation and

height. • To change the appearance of a 3-D chart once you have created one,

make sure it is an active chart then click Chart on the menu bar and then click 3-D View.

Page 68: Microsoft Excel

Microsoft Excel 68

XPThe 3-D View dialog box

The 3-D View dialog box is shown in this figure. Through the use of buttons or entering values in the appropriate text boxes of the 3-D View dialog box, you may change the appearance of the chart quickly and easily.

Page 69: Microsoft Excel

Microsoft Excel 69

XPInsert drawing objects into your workbook

• The Drawing toolbar helps you create many types of graphical shapes.

• Use the Drawing toolbar to add text boxes, lines, block arrows and other objects to charts and worksheets.

• If the Drawing toolbar is not already displayed, choose to display it by clicking View on the menu bar, pointing to Toolbars, and then clicking Drawing.

Page 70: Microsoft Excel

Microsoft Excel 70

XPUse Drawing toolbar AutoShapes

• The Drawing toolbar contains a list of predefined shapes, called AutoShapes, which can be anything from simple squares to complicated objects like flow charts or block arrows.

• Once you select a shape from the toolbar, click and drag an area on your chart or worksheet where you want to insert the object and Excel will draw it for you.

• Once you insert a drawing object onto a chart or worksheet, you can resize or move it just like any other object.

• You can also modify the fill color and border style of an AutoShape, and even insert text.

Page 71: Microsoft Excel

Microsoft Excel 71

XPThe Drawing toolbar

Another way to display (or close) any toolbar is by right-clicking anywhere on an existing toolbar or the menu bar. When the shortcut menu pops up, choose the toolbar you want to open (or close) by clicking its name. The Drawing toolbar is depicted in this figure.

Clicking the AutoShapes button list arrow will display a menu of AutoShape types. Each menu option has a submenu displaying shapes of that category.

Page 72: Microsoft Excel

Microsoft Excel 72

XPSizing and rotating an AutoShape

• When you select an AutoShape on a chart or worksheet:– The selection handles appear as open circles

– There is also a diamond tool for some shapes, which you can use to change the shape of the AutoShape by dragging it either in towards the center or away from it

• A green selection handle attached to the AutoShape through a vertical line is a rotation handle. – You can rotate the AutoShape by clicking and dragging on this

handle

Page 73: Microsoft Excel

Microsoft Excel 73

XPA chart with a selected AutoShape

The open circles are sizing handles.

The diamond can be used to change the shape of the AutoShape by dragging it outward or into the center of the shape.

Page 74: Microsoft Excel

Microsoft Excel 74

XPPrint a chart sheet

• Printing a chart sheet is much the same as printing a worksheet, but in place of the Sheet tab that you would normally see for a worksheet there is a Chart tab.

– The Chart tab includes options for Printed chart size and quality

• Excel provides three choices for defining the size of a chart printout: Use full page, Scale to fit page, and Custom.

• As with worksheets, you should preview the printout before sending the chart to the printer.

• You can print multiple sheets at once without printing the entire workbook. Press and hold the Shift key, then click on each sheet you want to print. When finished selecting, release the Shift key and then print.

Page 75: Microsoft Excel

Microsoft Excel 75

XPChoose a chart printing option

• When you select the Use full page choice for Printed chart size:– The chart is resized to fit the full page, extending out to the

borders of all four margins, which may change the proportions – This is the default option

• The Scale to fit page choice resizes the chart proportionately until one of the edges reaches a margin border. – When using this choice, the chart may not fit the entire page

• For the Custom choice, dimensions of the printed chart are specified on the chart sheet outside of the Print Preview window.

Page 76: Microsoft Excel

Microsoft Excel 76

XPThe Chart tab of the Page Setup dialog box

Be careful when selecting the Printed chart size option. Each option has a different effect on how the chart will look when printed. Always preview the chart before printing it to be sure the option you selected has not altered or truncated the chart.

Page 77: Microsoft Excel

Microsoft Excel 77

XP

Microsoft Excel

3 – Working With Excel Lists

Page 78: Microsoft Excel

Microsoft Excel 78

XPIdentify the elements of an Excel list

• Excel provides features that allow you to maintain lists of information such as customer lists, telephone lists, inventory lists, and so on.

• An Excel list is a collection of rows and columns that contain similar data.

• In a worksheet, each column represents a field of data and each row represents a record of data.

• The first row of the list always contains the name of the fields and is called a field header row.

Page 79: Microsoft Excel

Microsoft Excel 79

XPAn example of an Excel list

This figure shows a portion of a list of vehicles. Notice that each column in row 1 in the list contains the name of a field and that each row represents a record.

Page 80: Microsoft Excel

Microsoft Excel 80

XPFreeze rows and columns

• When you scroll through large amounts of data in a worksheet, you can move data off the screen.

• If you prefer to have portions of data remain on the screen at all times, such as the column and/or row headings, you can freeze a portion of the list so that it remains while the rest of the data scrolls.

• To freeze rows and columns:– Click in a cell to select it– Click Window on the menu bar, and then click Freeze Panes to

freeze the rows above the selected cell, and the columns to the left of the selected cell

– Excel will display dark vertical and horizontal lines to indicate the rows and columns that are frozen

Page 81: Microsoft Excel

Microsoft Excel 81

XPA frozen datasheet

In this figure, the window has been frozen below row 1 and to the right of column A.

When the user scrolls the worksheet, the field names and the ID # will remain on the screen.

Page 82: Microsoft Excel

Microsoft Excel 82

XPChange zoom settings for displaying a worksheet

• Sometimes, it will be necessary for you to see more or less data on a screen at a time.

• You can alter what appears within the screen by changing the zoom setting. – By default, the worksheet is set to display at 100%

• To zoom out (to see more), decrease the zoom setting

• To zoom in (to see less), increase the zoom setting

Page 83: Microsoft Excel

Microsoft Excel 83

XPThe Zoom dialog box

This figure shows the Zoom dialog box. In this box you can choose the zoom magnification you desire.

You can choose one of the percentages in the list or you can enter an amount you want in the Custom zoom box.

Page 84: Microsoft Excel

Microsoft Excel 84

XPA worksheet at 50% zoom

In this figure, the worksheet has been zoomed to 50%. Notice that the data is quite small; however, you can see a large amount of the data within one view window.

Page 85: Microsoft Excel

Microsoft Excel 85

XPFind and replace values in a worksheet

• The Find command allows you to search through the data in a worksheet for a particular character string.

• Optionally, you can choose to replace the character string with another string.

• This procedure is called Find and Replace. – For example, you might want to find every occurrence

of ACCT and replace it with Accounting

Page 86: Microsoft Excel

Microsoft Excel 86

XPThe Find and Replace dialog box

This figure shows the Find and Replace dialog box. In the “Find what” text box you would enter what you want to look for, such as ACCT. In the “Replace with” text box, you would enter what you want to replace the value with, such as Accounting.

Page 87: Microsoft Excel

Microsoft Excel 87

XPSort data in a list

• Excel makes it easy to sort a list in ascending or descending order based on any field(s) in the list.

• The field(s) selected on which to sort are called the sort fields or the sort keys.

• You may choose to sort the data on a single field or on a collection of fields.

Page 88: Microsoft Excel

Microsoft Excel 88

XPSort using a single sort key

The figure below shows a list of vehicles sorted on the Department Assigned field. Since only one field is used in the sort, the Sort Ascending button was pressed while the cursor was anywhere in the Department Assigned column.

Page 89: Microsoft Excel

Microsoft Excel 89

XPSort using multiple keys

If you want to sort on more than one field you will need to use the Sort dialog box, as shown in the following figure. In this dialog box, you can select up to three fields to use as sort keys.

Page 90: Microsoft Excel

Microsoft Excel 90

XPUse a data form to enter, search for, edit, and delete records

• Sometimes it is easier to view the data in a list through a data form.

• A data form is a dialog box that you can use to arrange data to view one record at a time.

• You can use the data form to display records, to search for records, to modify records, and to delete records from the Excel list.

Page 91: Microsoft Excel

Microsoft Excel 91

XPAn Excel data form

This figure shows a data form created for the Vehicles list. Notice that one record only is displayed in the form. Also notice that there are buttons provided for creating a new record, deleting a record, and for filtering records (i.e., the “Criteria” button).

Page 92: Microsoft Excel

Microsoft Excel 92

XPFilter data in a list using AutoFilters

• Sometimes you will want to see a portion of the records instead of all of them.

• The processing of displaying only those records that meet some criteria is called Filtering.

• When data in the list is filtered, records that do not meet your criteria are hidden. – These records are not removed from the list and, therefore, can be

redisplayed by removing the filter • Simple filters can be specified by clicking the list arrow on

any field name cell.• More complex filters must be created using the Custom

AutoFilters option.

Page 93: Microsoft Excel

Microsoft Excel 93

XPAutoFilter options

In the figure below, you see the vehicles list with the AutoFilter option invoked. Notice each field name has an arrow beside it. In the figure, you see that the list arrow for the Make field has been clicked, revealing the filtering options.

Page 94: Microsoft Excel

Microsoft Excel 94

XPApply conditional formatting to a range

• There are times when you will want data to have a different appearance if it meets some criteria. – For example, you might want data to appear in red, if the data is

more than six months old

– Or, you might want a value to be black if it is positive and red if it is negative

• This kind of formatting is called conditional formatting.

• You specify the condition under which you want the formatting to take place and what the formatting should be.

Page 95: Microsoft Excel

Microsoft Excel 95

XPThe Conditional Formatting dialog box

In the figure below, you see the Conditional Formatting dialog box. In this dialog box you would specify the condition(s) under which you want formatting to apply. Notice the Add button on the dialog box. If you click the Add button, you can specify additional conditions and formatting.

Page 96: Microsoft Excel

Microsoft Excel 96

XPInsert subtotals into a list

• The data in a list can be summarized by adding subtotals to the list.

• You can include summary information such as a count, a sum, an average, a minimum value, and or a maximum value.

• When the Subtotals command is applied to the list, a subtotal row is automatically added to the list.

• You can specify that you want the subtotal(s) to apply to the worksheet and/or groups within the worksheet.

Page 97: Microsoft Excel

Microsoft Excel 97

XPThe Subtotal dialog box

The figure below contains an example of the Subtotal dialog box. In this dialog box you can specify where to add the subtotals, what function to use in the subtotal, and various other selections related to subtotals.

Page 98: Microsoft Excel

Microsoft Excel 98

XPAn Excel datasheet with totals added

In the figure below, subtotals have been added for the Purchase Price field, which are inserted whenever the value of the Department Assigned field changes value.

Page 99: Microsoft Excel

Microsoft Excel 99

XPUse the subtotals outline view

• Previously you learned about creating subtotal lines within a worksheet.

• Sometimes, it might be more beneficial to view the summary information only.

• You can do this by displaying the data in Subtotals Outline View.

• You may choose from Level 1, Level 2, and Level 3 outline view.

Page 100: Microsoft Excel

Microsoft Excel 100

XPTotals displayed in Outline view

In the figure below, the list of vehicles has been shorted to a Level 2 outline. Notice that only the subtotals and the Grand Total are displayed. Keep in mind that all the data is still in the worksheet, it is just not displayed when the outline view has been selected.

Page 101: Microsoft Excel

Microsoft Excel 101

XPSummarize a list using a PivotTable and a PivotChart

• Often, there is so much data in a worksheet that it is difficult to analyze the data.

• A PivotTable report provides a meaningful summary of the data in an organized manner.

• In the PivotTable, data is summarized into categories of data.

• A PivotChart is associated with a PivotTable report.

• To create the PivotChart you must specify the data fields to be included in the chart as well as the category fields.

Page 102: Microsoft Excel

Microsoft Excel 102

XPAn example of a Pivot Table

The figure below contains a sample PivotTable. Notice that the data is summarized for each make of vehicle. The data includes summary data for the type of car within each make. An additional column shows the Grand Total for each Make of vehicle.

Page 103: Microsoft Excel

Microsoft Excel 103

XPPlan a Pivot Table

• Creating a PivotTable requires pre-planning of the data you would like to see summarized in the PivotTable.

• It is often a good idea to create a plan and even sketch the desired table.

• This will help you decide which fields should be placed in the row, column, and data placeholders when running the wizard.

Page 104: Microsoft Excel

Microsoft Excel 104

XPA Pivot Table plan

This figure shows a sample plan for a Pivot Table. It states an overall goal for the table, the results the designer wants to see, the information needed to produce those results, and the method required to obtain the desired results.

Page 105: Microsoft Excel

Microsoft Excel 105

XPSketch your Pivot Table

Drawing a sketch of the Pivot Table can make the creation of the table much easier. You get a visual image of the data you need and the results you want to display.

Page 106: Microsoft Excel

Microsoft Excel 106

XPModify a Pivot Table

• After the PivotTable is created you can change the layout of the table.

• You may want to make changes to the formatting, sort the data, add a field, or add a Page View.

• You can also easily turn the PivotTable into a chart by clicking the Chart button while the cursor is anywhere in the PivotTable.

Page 107: Microsoft Excel

Microsoft Excel 107

XPAn example of a Pivot Chart

This figure illustrates a PivotTable that is displayed as PivotChart.

Page 108: Microsoft Excel

Microsoft Excel 108

XP

Microsoft Excel

4 – Working With Multiple Worksheets and Workbooks

Page 109: Microsoft Excel

Microsoft Excel 109

XPCreate a worksheet group

• A workbook is a collection of worksheets. • You may want to work with the worksheets within

a workbook as if they were a single unit. • You can combine worksheets together into a

group. Grouping worksheets allows you to: – Apply formulas across the worksheets in the group

– Apply formatting across worksheets in a group

– Make multiple changes through a single change

Page 110: Microsoft Excel

Microsoft Excel 110

XPA worksheet group

In the figure below, the monthly worksheets have been grouped. Notice that the title bar indicates that a group has been selected.

Notice also that the Documentation worksheet is not included in the worksheet group.

Changes made to the worksheets within the group will be reflected in all the worksheets in the group.

Page 111: Microsoft Excel

Microsoft Excel 111

XPPrint a worksheet group

• You can set up the page layout and print area for all worksheets in a group by selecting a worksheet group and then accessing the Page Setup dialog box. To do this:– Select the Worksheets to be printed

– Click the File menu, and then click Page Setup

– Set the margin or page layout options you want to use

– Click the Print Preview button to see how the pages will look when printed

– Use the Next and Previous buttons to browse through the pages

– Click the Print button to print the selected pages

Page 112: Microsoft Excel

Microsoft Excel 112

XPUse Print Preview mode

A selected workgroup in Print Preview mode.

Page 113: Microsoft Excel

Microsoft Excel 113

XPEdit multiple worksheets at the same time

• In a worksheet group, you can enter formulas that will effect all of the worksheets in the group. – For example, placing a formula in cell A5 in a worksheet in a

group, will place that same formula in cell A5 in all the worksheets in the group

• You can also apply formatting to a worksheet in a worksheet group that will affect all of the worksheets in the group. – For example, if you apply an AutoFormat to a worksheet in a

worksheet group, all of the worksheets in the group will receive the AutoFormat

• The worksheets will continue to be considered a group until you specify the “Ungroup Sheets” option.

Page 114: Microsoft Excel

Microsoft Excel 114

XPCreate 3-D cell references and workbook references

• Think of the collections of worksheets in a workbook as a third dimension.

• You know that you can reference rows and columns in a worksheet.

• You can also reference worksheets. You can, therefore, have a reference in a worksheet that pertains to a cell in another worksheet. – The reference Sheet3!A5 is a reference to cell A5 on Sheet3

• You can place the reference in any cell on any worksheet within the workbook.

Page 115: Microsoft Excel

Microsoft Excel 115

XPThe three dimensions of a workbook

The following figure provides a graphical representation of the three-dimensional aspects of a workbook.

Page 116: Microsoft Excel

Microsoft Excel 116

XPAn example of a 3-D Cell reference

In the next figure, notice in the formula text box that the formula reference is B6 in the November worksheet.

Page 117: Microsoft Excel

Microsoft Excel 117

XPConsolidate information from multiple worksheets and workbooks

• In a workbook, you often have several worksheets that represent the same kind of data but for different entities.

• It may be beneficial for you to summarize the data onto one worksheet, or consolidate the data.

• When you consolidate, each worksheet must have the same format and structure.

• You can easily copy the contents and/or formats of a worksheet to a whole group of worksheets with the “Fill Across Worksheets” dialog box.

• On the sheet you intend to use to summarize the data of the worksheets, you can use 3-D Cell References to calculate totals across the worksheets involved in the summary.

Page 118: Microsoft Excel

Microsoft Excel 118

XPThe Fill Across Worksheets dialog box

The figure below depicts the Fill Across Worksheets dialog box. Notice that you can copy just the contents, just the Formats, or both.

Page 119: Microsoft Excel

Microsoft Excel 119

XPA summary worksheet

In this figure, you see that the Expenses and Inflows of the monthly worksheets have been summarized in the Annual worksheet.

This was accomplished by applying 3-D formulas that reference pertinent cells throughout the worksheets.

Page 120: Microsoft Excel

Microsoft Excel 120

XPCreate a workbook template

• In business, you often create workbooks that have common elements such as invoices, expense statements, etc.

• Using a template makes this process easier because the elements are already in place; all you do is fill them in.

• You can use any of the templates supplied with Excel or you can create your own.

• When you design your template, you can include formatting and calculations.

• When you open a new workbook with the template, the formatting and calculations will be built into the workbook.

Page 121: Microsoft Excel

Microsoft Excel 121

XPUse pre-built templates

Excel has many pre-built templates you can choose from.

When you click on a template icon, you see a preview of the template here.

Page 122: Microsoft Excel

Microsoft Excel 122

XPAn Excel template

This particular worksheet is used to create a Balance Sheet. The user would fill in the pertinent information and then save the file as a workbook. The template, however, remains unchanged.

This figure shows a template provided by Excel.

Page 123: Microsoft Excel

Microsoft Excel 123

XPStore and access templates

• To save a template, use the “Save As” option on the File menu and then change the “File Type” to template.

• When you save a template, it must be saved in the Templates folder. – This makes it possible for Excel to locate the template when you

are ready to use it again

– You usually don't see the Templates folder in Windows Explorer because it is a hidden folder

– Once the template has been saved, it will be listed as an icon in the Templates dialog box.

Page 124: Microsoft Excel

Microsoft Excel 124

XPThe Templates folder

Templates are stored in a templates folder. You don’t normally need to access this folder unless you want to copy a template to some other disk to move it to a different machine or folder.

Page 125: Microsoft Excel

Microsoft Excel 125

XPThe Templates dialog box

This figure shows how the stored template you created would appear in the Templates dialog box.

Page 126: Microsoft Excel

Microsoft Excel 126

XPStore templates in subfolders

You can categorize templates by creating sub-folders in the Templates folder for templates that are of the same type, or for the same project, etc.

Page 127: Microsoft Excel

Microsoft Excel 127

XPIdentify subfolders in the Templates dialog box

The previous slide showed a subfolder had been created in the Templates folder. When a subfolder is created in the Templates folder, it will appear as a tab in the Templates dialog box. Clicking that tab will show you the templates stored in that folder.

Page 128: Microsoft Excel

Microsoft Excel 128

XPLink workbooks to summarize data

• You can summarize data from several workbooks by creating links between them.

• To create a workbook reference:– Click the tab for the workbook that will be the destination

workbook– Click in the cell that will receive the data, and enter an equal sign

(=), but do not press the Enter key– Switch to the target workbook, click in the cell containing the data

to be linked, and press the Enter button on the Formula bar– The formula referencing the source workbook will appear in the

destination cell

Page 129: Microsoft Excel

Microsoft Excel 129

XPLink Workbooks by specifying source and destination files

Creating links from one workbook to another allows data to be used in both workbooks.

Page 130: Microsoft Excel

Microsoft Excel 130

XPA summary sheet with a workbook reference

This workbook (LBCSum2) has a summary sheet with a cell reference to the LBC2000 workbook.

Page 131: Microsoft Excel

Microsoft Excel 131

XPChange Workbook references

If a workbook is linked to another workbook that contains yearly totals, when a new workbook is created for a new year, the Find and Replace dialog box can be used to update all cell references to point to the correct workbook, or to add the new year totals to a new column in the existing workbook.

Page 132: Microsoft Excel

Microsoft Excel 132

XPThe Edit Links dialog box

Links can be updated or broken using the Links dialog box.

Page 133: Microsoft Excel

Microsoft Excel 133

XPCreate a lookup table and use Excel's lookup functions

• You can create a Lookup Table that will summarize data but will allow you to perform lookups that will go to particular workbook references to retrieve data. – A lookup table organizes values that you want to retrieve into

different categories

– These categories are called compare values

– If you want to locate a particular value, you must supply a lookup value that is matched against the compare value

– The lookup value and compare value are tested against each other and the matching value is then returned from the workbook cell reference

Page 134: Microsoft Excel

Microsoft Excel 134

XPThe Function Arguments dialog box

In the figure below shows the Function Arguments dialog box for the VLookup function. Notice as you click through the arguments that the dialog box provides information about what each argument represents.

You can also use the question mark in the upper right corner to display information about each argument.

Page 135: Microsoft Excel

Microsoft Excel 135

XPA formatted lookup section

This workbook has a formatted lookup section that can be used to quickly locate and view data from previous years.

Page 136: Microsoft Excel

Microsoft Excel 136

XPCreate and use an Excel workspace

• Often, you will create several workbooks that are related to one another in terms of subject.

• You may want to open all of those related workbooks at one time, which you can do by creating an Excel workspace. – An Excel workspace is a file that contains information about all

workbooks that are currently open – The information saved in a workspace includes the location of the

workbooks, the window sizes, and the screen positions – Once the workspace has been created, you will only need to open

the workspace file and all of the related workbooks will open as well

Page 137: Microsoft Excel

Microsoft Excel 137

XPOpening a workspace file

This figure contains an Open dialog box illustrating a workspace file called Choir Files. Opening this file would also open the five choir workbooks that are linked to this file.

Page 138: Microsoft Excel

Microsoft Excel 138

XP

Microsoft Excel

5 – Working With Excel’s Editing and Web Tools

Page 139: Microsoft Excel

Microsoft Excel 139

XPCheck the spelling in a workbook

• Excel provides Spell Checking features that help you easily correct spelling errors.

• You can check one worksheet or you can group worksheets to check them at one time.

• When you click the Spelling button on the Standard toolbar, the Spell Checking process will begin.

Page 140: Microsoft Excel

Microsoft Excel 140

XPUse the Spell Checker feature

• When you run the Spell Checker feature:– Any misspelled word will invoke the Spelling Dialog Box

– In the top portion of the Spelling Dialog Box, you will see the misspelled word

– In the lower portion of the dialog box, you will see suggested substitutions for the misspelled word

– If you want to select one of the suggestions, highlight that word and then click the Change button

– If the misspelled word is not misspelled but the Spelling dictionary does not recognize it as a correct word, you might consider adding that word to the dictionary

Page 141: Microsoft Excel

Microsoft Excel 141

XPThe Spelling dialog box

The figure below shows the Spelling Dialog Box illustrating the misspelling of the word contingencies. Notice there are several options on the right side of the dialog box from which you can choose to respond to the misspelled word.

Page 142: Microsoft Excel

Microsoft Excel 142

XPAudit formulas

• In a worksheet, it is very important that formulas are accurate.

• If they are not, you will be presenting inaccurate results.

• Excel provides several tools for analyzing the formulas in your worksheets, including the audit feature, which allows you to check the accuracy of your formulas.

Page 143: Microsoft Excel

Microsoft Excel 143

XPUse the Formula Auditing toolbar

• When you invoke the Formula Auditing toolbar, you can choose from several options provided for auditing formulas.

• Cells that are used in a formula are called Precedent Cells. • You can use the Trace Precedents button on the Formula

Auditing toolbar to provide information about the cells used in a formula.

• The Trace Precedents buttons will display an arrow indicating the cells involved in the formula.

• Often, this arrow will make it clear that the formula is either accurate or that it needs to be changed.

Page 144: Microsoft Excel

Microsoft Excel 144

XPThe Formula Auditing toolbar

The Formula Auditing toolbar contains several commands that can be used to audit formulas used in Excel worksheets.

Page 145: Microsoft Excel

Microsoft Excel 145

XPTrace Precedents example

This figure shows a spreadsheet with precedent tracer arrows.

Page 146: Microsoft Excel

Microsoft Excel 146

XPDependent Cell trace

This figure show a dependent cell trace.

Page 147: Microsoft Excel

Microsoft Excel 147

XPTrace and fix formula errors

• Worksheets often have large amounts of data in them and numerous formulas; it’s quite possible to inadvertently make an error in worksheet formulas.

• Excel provides tools that will allow you to view formulas and to identify possible errors.

• You can use the Trace Error option on the Formula Auditing toolbar to produce an arrow that shows the possible source of the error.

Page 148: Microsoft Excel

Microsoft Excel 148

XPUse Trace Error and Show Formula features

• If you view the formula in questions by following the tracer error, you can often identify the problem.

• You can then edit the formula and observe whether the error has been eliminated.

• You can also search the workbook for potential errors by clicking the Error Checking button on the Formula Auditing Toolbar.

• An additional option is to display all the formulas in a worksheet. – Seeing the formulas in the worksheet will often make it clear

where errors have been made

Page 149: Microsoft Excel

Microsoft Excel 149

XPExcel error values

This table displays the error codes that Excel will place in a cell with a formula error, and a description of what likely caused the error.

Page 150: Microsoft Excel

Microsoft Excel 150

XPIllustration of a #VALUE error

The figure below illustrates a trace of a #VALUE error. Notice that the figure shows an error has been made in the SUM formula.

If you see a formula displayed in the cell like this, it is usually because the equal sign has been left out of the formula.

Note: All formulas must be preceded by an equal sign.

Page 151: Microsoft Excel

Microsoft Excel 151

XPView error information

Excel makes it easy to find information about an error code displayed in a cell.

When you see an error code in a cell, click the cell and an alert box will appear. Click the alert box, and a shortcut menu pops up. Click Help on this error and this Help box will appear. This Help box concerns the #REF error, and it explains what causes it and how to fix it.

Page 152: Microsoft Excel

Microsoft Excel 152

XPShow worksheet formulas

You can have Excel display all formulas in all cells by clicking the Tools menu, point to Formula auditing, and then clicking Formula Auditing Mode. This figure shows a worksheet in this mode, and you can see the formulas in all cells that contain a formula.

Page 153: Microsoft Excel

Microsoft Excel 153

XPInsert and edit cell comments

• A comment is a text box that is attached to a specific cell and only displays when that cell is clicked.

• You can add comments to the worksheet or to a single cell.

• To add a comment, right-click the cell where you want the comment and then press the Insert Comment button on the shortcut menu.

• As the worksheet is passed around amongst the members of a group, each person can add comments containing suggestions for change.

Page 154: Microsoft Excel

Microsoft Excel 154

XPA worksheet with a comment displayed

This figure shows a comment that has been added to this worksheet.

Notice that the comment appears in a text box and that there is a small red triangle at the location where the comment was placed in the worksheet.

You can also hide comments so that they are not distracting as the worksheet is viewed. By doing so, the comments would only be displayed when the mouse hovers over the cell where the comment was placed.

Page 155: Microsoft Excel

Microsoft Excel 155

XPTrack, highlight, and review changes to the workbook

• Often, there will be multiple people working on a worksheet.

• If this is the case, the workbook must be made shareable by clicking the Share Workbook option on the Tools menu.

• Once a workbook becomes a shared workbook, it is important that changes made by the individual user do not conflict with changes made by other individuals.

• When multiple user are working on a workbook, they should provide comments indicating the changes they have made.

• The reviewing toolbar will allow you to track comments that have been inserted.

Page 156: Microsoft Excel

Microsoft Excel 156

XPSharing workbooks can introduce document errors

This figure illustrates how a conflict can be created when multiple users attempt to make changes to a shared workbook. It is very important that conflicts are resolved appropriately.

Page 157: Microsoft Excel

Microsoft Excel 157

XPResolving a conflict in a shared workbook

This figure illustrates the resolution of the conflict that was shown in the previous slide.

Page 158: Microsoft Excel

Microsoft Excel 158

XPUse the Track Changes feature

• You can track changes that have been made by selecting Track Changes on the Tools menu.

• You can choose to highlight changes that have been made or you can choose to list all the changes on a separate worksheet.

• Finally, you can choose to either accept or reject the changes that have been made by individual users.

Page 159: Microsoft Excel

Microsoft Excel 159

XPThe Highlight Changes dialog box.

To highlight the changes in a shared workbook, click the Tools menu, point to Track Changes, and click Highlight Changes to open the dialog box below. Set the options you want to use and click the OK button to apply those options.

Page 160: Microsoft Excel

Microsoft Excel 160

XPView changes in the workbook

In this figure, several cells are shown with a colored border, indicating they have been changed.

Comments can be viewed by placing the pointer over the comment area for a few seconds until the comment box appears.

Page 161: Microsoft Excel

Microsoft Excel 161

XPMail and merge workbooks

• On the File menu, you have an option to Send To a recipient(s), which would e-mail the file to reviewers.

• When you are working with multiple users of workbook(s), you may find that you have two versions of a workbook.

• One workbook could be the one you have already edited yourself and another is the same workbook but it has been edited by one of the users.

– You may need to merge those two workbooks to reflect all the changes that have been made

– To do this, click the Compare and Merge Workbooks option on the Tools menu

– You can then Accept and Reject the changes

Page 162: Microsoft Excel

Microsoft Excel 162

XPSend To options for e-mailing a worksheet

The figure below shows the Send To options available for mailing a worksheet to someone. Notice that you have several options to choose from.

You can send the workbook to just one user or to several users.

You can also post the workbook to a Microsoft Exchange folder, allowing network users to access the workbook.

Page 163: Microsoft Excel

Microsoft Excel 163

XPSave the workbook as a Web page

• You can easily turn a workbook into a Web page. – You can choose whether the page will be static or interactive – A static Web page means that the data cannot be modified – An interactive Web page means that the data can be modified within the

Web page

• When you create a Web page, Excel creates an HTML version of the workbook that can be viewed in a Web browser.

• You can save the entire workbook as a Web page or you can save just one worksheet.

• All of these choices can be made by clicking the Save as Web Page option on the file menu.

Page 164: Microsoft Excel

Microsoft Excel 164

XPInteractive versus non-interactive Web page

In the figure below, you see two Web pages. The page on the left is a non-interactive Web page, which a user can view but cannot change. The page on the right is an interactive Web page, which the user can use to alter the data and/or format of the worksheet.

Page 165: Microsoft Excel

Microsoft Excel 165

XPThe Save As dialog box

This figure shows a workbook being saved as a Web page. Note the Save as type: box specifies Web page format. Also note the checkbox that determines if the page will be interactive or not.

Page 166: Microsoft Excel

Microsoft Excel 166

XPCreate and edit hyperlinks

• Hyperlinks are clickable text that cause another page to be opened in the Web browser.

• You can easily add a hyperlink to a Web page by clicking the Hyperlink option on the Insert menu.

• You can also set up Excel's Web options so that various browsers are supported by the Web pages you create.

• If you have users who use different browsers, it is a good idea for you to consider setting this option so that it supports whatever browsers you viewers will use.

Page 167: Microsoft Excel

Microsoft Excel 167

XPThe Insert Hyperlink dialog box

To insert a hyperlink, select the text or cells to be used for the hyperlink, click the Insert menu, then click Hyperlink to open this dialog box.

Use the Look in: box to locate the drive and folder containing the target of the hyperlink. You can change the text that displays for the link if you so desire at the top of the text box.

Page 168: Microsoft Excel

Microsoft Excel 168

XPA worksheet with a hyperlink

In the figure below, you see a worksheet that contains a hyperlink to an HTML document, which will display Meeting Details. If the user of this worksheet clicks this link, the Meeting.html file will open in the Web browser. The hyperlink must point to an existing Web page or other Excel objects such as a workbook, worksheet, or range.

Page 169: Microsoft Excel

Microsoft Excel 169

XP

Microsoft Excel

6 – Developing an Excel Application

Page 170: Microsoft Excel

Microsoft Excel 170

XPCreate validation rules for data entry

• You will want to prevent errors in your workbooks as much as possible.– You can specify the type of data that is allowed and/or a range

of acceptable values– If a value is entered that does not meet the requirements, an

error message is displayed – Setting a rule like this is a preventative measure that allows you

to validate data upon entry• There are several different options in the Data Validation

dialog box allowing you to provide various rules related to data entry.

• You can also provide an input message that will aid the user in entering the data.

Page 171: Microsoft Excel

Microsoft Excel 171

XPThe Data Validation dialog box

This figure shows the Data Validation dialog box. Note the three tabs on the dialog box.

Use the Error Alert tab to set what style of error message you want to appear when the validation criteria is not met.

Use the Settings tab to specify the validation criteria. Use the Input

Message tab to specify a prompt that will aid the user in entering data.

Page 172: Microsoft Excel

Microsoft Excel 172

XPThe Allow list box options

The table below shows the options available in the Allow list box field of the Data Validation dialog box, and a description of their purpose.

Page 173: Microsoft Excel

Microsoft Excel 173

XPThe Input Message tab of the Data Validation dialog box

On the Input Message tab of this dialog box, you can create an input message to display when a user clicks on a worksheet cell.

Page 174: Microsoft Excel

Microsoft Excel 174

XPA worksheet with an input message displayed

This figure shows a portion of a worksheet with an Input Message displayed for a date field. By prompting the user for the correct information, you reduce the risk of error.

Page 175: Microsoft Excel

Microsoft Excel 175

XPThe Error Alert tab of the Data Validation dialog box

On the Error Alert tab of this dialog box, you can create a Stop alert that will display if the user attempts to enter something that violates the validation rules defined for the field.

Page 176: Microsoft Excel

Microsoft Excel 176

XPProtect the contents of worksheets and workbooks

• Once you have a worksheet that you know is correct, you may want to protect the worksheet so that users cannot make changes. – Setting the locked property will disallow any changes to a

particular cell– The worksheet will have to be protected in order for the locked

property to have any affect

• You can also specify a password that must be entered in order to remove worksheet protection.

• Finally, you can protect an entire workbook, which would disallow changes to the workbook, such as adding or deleting worksheets.

Page 177: Microsoft Excel

Microsoft Excel 177

XPUnlocking Selected Cells

To lock or unlock specific cells, click the cells to select them, click the Format menu, click Cells, and then click the Protection tab, as shown in this figure. Click the Locked option box to insert or remove the check mark.

Page 178: Microsoft Excel

Microsoft Excel 178

XPThe Protect Sheet dialog box

This figure shows the Protect Sheet dialog box. Notice that there are many options on this dialog box that you can set to allow or disallow. These rules will apply only to the selected worksheet.

Page 179: Microsoft Excel

Microsoft Excel 179

XPThe Protect Workbook dialog box

To protect an entire workbook, click the Tools menu, point to Protection, and then click Protect Workbook.

The dialog box shown here will open. Select the option(s) you want, and you can also assign an optional password to prevent anyone else from changing the settings you specify.

Page 180: Microsoft Excel

Microsoft Excel 180

XPCreate and use range names

• It may be useful assign a name to a cell or cell range. • This is called a range name and allows you to refer to

the cell or range of cells by their name instead of their cell references. – For example, you might assign a range name,

Expenses, to a group of cells that represent your expenses

– When you want to calculate with those cells, you enter their Range Name in the formulas instead of the cell reference

• You can later change the definition of the range names.

Page 181: Microsoft Excel

Microsoft Excel 181

XPThe Allow Users to Edit Ranges dialog box

If you want to allow users to edit portions of a worksheet, you can set up ranges in which the user can make edits. This is done on the Allow Users to Edit Ranges dialog box as shown in this figure.

Page 182: Microsoft Excel

Microsoft Excel 182

XPThe Define Name dialog box

The figure below is an example of the Define Name dialog box. It is in this dialog box that you can establish range names and set their definition. The easiest approach is to select the cells you want to have a name first and then open this dialog box by clicking Name from the Insert menu and then clicking Define.

Page 183: Microsoft Excel

Microsoft Excel 183

XPView multiple range names

This figure shows the Define Name dialog box with multiple ranges defined. If you click on a range name, the Refers to: box at the bottom tells you what cells are defined for that range.

Page 184: Microsoft Excel

Microsoft Excel 184

XPUsing Range Names in a chart

This figure shows a chart that has been defined using range names to specify the data. Note that the workbook name must precede the range name.

Page 185: Microsoft Excel

Microsoft Excel 185

XPMacro viruses and Excel's security features

• Because a macro is a program, a virus can be attached to the macro. – A macro is attached to a workbook and just opening the workbook

can cause the macro to be run – If a macro has an attached virus, running the macro will likely

infect the computer being used to view the workbook • The first line of defense is to be sure you know where the

workbook came from and whether the source is trustworthy.

• Excel allows you to specify security for any workbook opened within Excel.

• There are three levels of security: high, medium, and low.

Page 186: Microsoft Excel

Microsoft Excel 186

XPThe Security dialog box

This figure shows the Security dialog box. Before making a selection, you should read the explanatory information associated with each choice. Notice that Low security is not recommended and should rarely be selected.

Page 187: Microsoft Excel

Microsoft Excel 187

XPCreate macros using the macro recorder

• One way to create a macro is to use the Excel macro recorder. – When you start the macro recorder, all of your keystrokes are

recorded and saved– Once you have completed the keystrokes you want recorded,

you can close the macro– Once the macro has been created, you can replay the macro at

anytime• The macro can be stored in the workbook, making it available

whenever the workbook is opened.• You can also store the macro in a new workbook or in the Personal

Macro workbook, which makes it available anytime Excel is running.

Page 188: Microsoft Excel

Microsoft Excel 188

XPThe Record Macro dialog box

When you create a macro, you need to give it a name. The figure below shows the Record Macro dialog box. In this figure, the macro is named Report30. Notice also the assignment of the “a” key as the shortcut key and that the macro will be stored in the active workbook.

Page 189: Microsoft Excel

Microsoft Excel 189

XPThe Macro dialog box

The following figure is another example of the Macro dialog box. In this dialog box, three macros have been created. Notice the Run button. To run a macro, you select the macro you want from the list and press the Run button.

Page 190: Microsoft Excel

Microsoft Excel 190

XPEdit and print a macro using the Visual Basic Editor

• All macros are small programs written in Visual Basic for Applications (VBA), which is the programming language for Office XP applications.

• You can create a new macro or edit an existing macro in the Visual Basic Editor. In the editor:– You can see the VBA statements that make the macro work – You can view and edit the commands

• The body of a macro is enclosed between the “Sub” and “End Sub” statements.

• The body consists of the statements that will be performed when the macro is run.

Page 191: Microsoft Excel

Microsoft Excel 191

XPThe VBA editor

• Learning to program in VBA is an extensive process.

• However, you can read through an existing macro and get an idea of how the macro works.

• You can print the macros so that you can review the printout.

Page 192: Microsoft Excel

Microsoft Excel 192

XPThe Visual Basic editor

This figure shows the Visual Basic Editor with the NewData procedure displayed in the editor window.

The macro begins with the “Sub NewData()” statement and end with the “End Sub” statement.

Page 193: Microsoft Excel

Microsoft Excel 193

XPUpdate a macro in the VBA editor

This figure shows a macro that has had a statement inserted to turn off screen updating. Once you learn VBA syntax, you can write entire macros using the editor instead of using the macro recording mechanism.

Page 194: Microsoft Excel

Microsoft Excel 194

XPAssign a macro to a keyboard shortcut

• You already learned how to invoke a macro through the macro menu.

• Another option is to assign a shortcut key to the macro.

• When the shortcut key is pressed, the macro is run.

Page 195: Microsoft Excel

Microsoft Excel 195

XPAssign a macro to a button

• You can create a button on the workbook that will invoke a macro.

• To create a macro button, you must first display the Forms toolbar.

• Then, select the button tool on the toolbar.• The button is assigned to a particular macro and,

when it is pressed, the assigned macro runs.

Page 196: Microsoft Excel

Microsoft Excel 196

XPThe Forms toolbar

In this figure, you see the Forms toolbar. Notice the button tool on the right side of the toolbar. This button tool will create a command button on your worksheet.

Page 197: Microsoft Excel

Microsoft Excel 197

XPA macro button on a worksheet

This makes it possible for the user to invoke the macro simply by pressing the button. In this figure, the text on the button is Button 8, however, this text can be altered to reflect how the button is to be used.

Once you have placed the command button on the worksheet, as shown in the figure below, you can assign the button to a macro.

Page 198: Microsoft Excel

Microsoft Excel 198

XPAdd multiple macro buttons

This figure shows a worksheet that has had macro buttons added to run a 30-day report, a 60-day report, or a 90-day report.

Page 199: Microsoft Excel

Microsoft Excel 199

XP

Microsoft Excel

7 – Importing Data Into Excel

Page 200: Microsoft Excel

Microsoft Excel 200

XPImport data from a text file into an Excel workbook

• Sometimes it is necessary to import data from another source into an Excel worksheet. One possible source of data is a text file.

• A text file is a file without formulas, graphics, special fonts, or formatting.

• A text file contains alphanumeric data, letters, numbers, and symbols like commas and tabs.

• Any structure the text file has must be supplied by some combination of text symbols.

Page 201: Microsoft Excel

Microsoft Excel 201

XPTypes of text files

• If the data is in columns, for instance, the column breaks must be indicated in some way. – In some text files, the columns are separated by a delimiter, such

as a space, a comma, or a tab, that shows where one column of data ends and another begins

• In other text files, the columns are fixed-width, which means that in each column, all the data begins at a fixed place on the line. – That is, in every row of data, the data in the first column starts at,

say, the first space, the data in the second column starts at the thirteenth space, and so on

Page 202: Microsoft Excel

Microsoft Excel 202

XPCommon text file delimiters

This figure shows several examples of text files using various delimiters to indicate column breaks.

Page 203: Microsoft Excel

Microsoft Excel 203

XPAn example of a fixed-width text file

This figure shows a fixed-width text file, where each column must start in a specific position.

Page 204: Microsoft Excel

Microsoft Excel 204

XPUse the Text Import Wizard

• If you open a text file in Excel, Excel starts the Text Import Wizard, which helps you determine what Excel needs to do to import the information from the text file into Excel in some meaningful way.

• The Text Import Wizard takes you through three dialog boxes: – In the first dialog box you have to check whether the data is delimited or

fixed-width. The Wizard will try to determine this itself, but if it is wrong, you can set this manually

– In the next dialog box, the Wizard helps you set up the breaks between the columns. The Wizard tries to detect the correct space to begin each column, but sometimes it cannot. When that happens, you need to edit the column break lines manually

– The final dialog box of the Text Import Wizard allows you to format the columns of data, one at a time. You can highlight each column, and check off whether the column contains text or dates

Page 205: Microsoft Excel

Microsoft Excel 205

XPThe first Text Import Wizard dialog box

In the first dialog box (Step 1 of 3) you have to check whether the data is delimited or fixed-width. The Wizard will try to determine this itself, or you can set this manually.

You also need to tell the Wizard where to start reading data. You can find out which row the columns of data start at by examining the data in the Preview window. Unless you tell it differently, the Wizard will start with row one.

Page 206: Microsoft Excel

Microsoft Excel 206

XPThe second Text Import Wizarddialog box

This figure shows the step 2 of 3 dialog box where you set column breaks. You can add a break line, delete line, or click and drag a break line to move it. The figure shows the three break lines that the Wizard placed where it thought the column breaks were.

As you can see, the break lines separate the numeric data correctly, but not the column titles. Also, there are only three break lines, but there should be four.

Page 207: Microsoft Excel

Microsoft Excel 207

XPThe second Text Import Wizarddialog box with modifications

This figure shows the same dialog box seen in the previous slide but the column lines have been moved manually to correctly separate the columns.

Page 208: Microsoft Excel

Microsoft Excel 208

XPThe third Text Import Wizard dialog box

Most columns can use the General format, which converts numeric values to numbers, date values to dates, and everything else to text, but if there is some chance that the Wizard might misinterpret the data in the column, you can specify the type.

This dialog box also lets you skip any column that you do not wish to import into your Excel worksheet.

Page 209: Microsoft Excel

Microsoft Excel 209

XPAn example of an imported text file

When you close the Text Import Wizard, you will see the data that the Wizard retrieved in the Excel worksheet, as shown in this figure.

You should save this worksheet as an Excel workbook, since if you close it without saving it, it will revert back to a text file. You can also use Excel tools to format the data.

Page 210: Microsoft Excel

Microsoft Excel 210

XPRetrieve data from database tables using the Query Wizard

• Another possible source from which you could import data into is a database.

• A database is a program that can store large amounts of data in tables.

• The rows in a database table are called records.• The columns are called fields.

– For example, a typical database is an address book. The information about each person in the database (the record) contains several fields - first name field, last name field, address field, telephone number field, and so on

– Each record in the table contains the same fields

Page 211: Microsoft Excel

Microsoft Excel 211

XPWhat is a query?

• Excel can import data from most database tables.

• To get information from a database, you must create a query.

• The query tells the database:– What information you want

– Which records you want it from

– How you want the data arranged

• Excel has an add-in called the Query Wizard to help you write queries to extract data from a database.

Page 212: Microsoft Excel

Microsoft Excel 212

XPStart the Query Wizard

• To import data using the Query Wizard, from the Data menu, choose Import External Data, and from the submenu that appears, select New Database Query.

• This brings up the Query Wizard - Choose Data Source dialog box.

• On the Databases tab of the dialog box you will see a list of possible data sources.

• You choose the database type and proceed to the next step, which is to locate the database file to be imported.

Page 213: Microsoft Excel

Microsoft Excel 213

XPThe Choose Data Source dialog box

This figure shows the Choose Data Source dialog box, where you indicate the type of source file to use.

Page 214: Microsoft Excel

Microsoft Excel 214

XPSelect tables and fields to import

• When you have located the database and clicked the OK button, the database opens the Query Wizard – Choose Columns dialog box.

• In the Available tables and columns: box, you will see a list of the tables in the database.

• You can see the columns (fields) in each table by clicking on the plus sign in front of the table.

• From these fields, you can select the ones you want to import and add them to the Columns in your query: box.

Page 215: Microsoft Excel

Microsoft Excel 215

XPThe Choose Columns dialog box

The figure on the left shows the available tables for the database just opened. When you click on the plus sign in front of the Company table table, its columns will be listed as shown in the figure on the right.

Page 216: Microsoft Excel

Microsoft Excel 216

XPApply filters to import data

• When you have selected all your fields, click the Next button to bring up the Query Wizard - Filter Data dialog box.

• When you are importing data from a database, you may want to filter the data by choosing some filtering criteria.

• To do this, in the Filter Data dialog box:– Click the column you wish to filter– Specify a comparison operator– Enter the desired criterion in the appropriate box

• If you want to use all the data or if you have finished writing all your filters, click Next to go to the Query Wizard - Sort By dialog box where you can specify what sequence the data is to be sorted in.

Page 217: Microsoft Excel

Microsoft Excel 217

XPThe Filter Data dialog box

This figure shows the Query Wizard – Filter Data dialog box where you can apply selection criteria to limit the data being imported to only records that meet your specified criteria.

Page 218: Microsoft Excel

Microsoft Excel 218

XPSave and run the query

• Your query is now defined.

• Click Next to bring up the final Query Wizard dialog box.

• This dialog box allows you to save the query you have just created, with a file extension of .dqy.

• Now, you may choose the Return Data to Microsoft Excel button.

• When you now select a cell in the worksheet, the Query Wizard runs the query against the database and inserts the data it extracts into the worksheet beginning at the selected cell.

Page 219: Microsoft Excel

Microsoft Excel 219

XPControl how data is retrieved by editing queries

• Excel knows when the data in a worksheet has been imported from an external source, and provides an External Data toolbar that makes available several options.

• To bring up the External Data toolbar, first make sure that your cursor is pointing to a cell containing external data.

• Choose Toolbars from the View menu, and choose External Data in the sub-menu.

• The External Data toolbar has a Refresh Data button. – When you click this, Excel goes to the data source that the data

was imported from, and brings into the worksheet any changes that have occurred since the data was loaded (or last refreshed)

Page 220: Microsoft Excel

Microsoft Excel 220

XPSet Data Range properties

• Clicking the Data Range Properties button on the External Data toolbar brings up the External Data Range Properties dialog box.

• The name under which you saved the query that produced this data appears in the Name: box.

• You can save the query, and even save a password for the query so that it cannot be changed unless the password is entered.

• You have several options about refreshing the data, about the data formatting and layout, and about what to do if the layout of the source document has changed when you attempt to refresh.

• Selecting the Refresh data on file open check box will cause Excel to query the data source for updated data every time the file containing this worksheet is opened.

Page 221: Microsoft Excel

Microsoft Excel 221

XPThe External Data Range Propertiesdialog box

This figure shows the External Data Range Properties dialog box. You can specify when Excel should refresh the imported data, as well as how data is formatted, and what to do when the data source has rows inserted or deleted.

Page 222: Microsoft Excel

Microsoft Excel 222

XPRetrieve data from a database into a PivotTable

• You have a stock database that has five entries for each of fifteen different stocks, showing the volume of shares and the high, low, and closing values of these stocks for the last five days.

• Instead of making fifteen different charts to track the data, you decide to create a PivotTable and PivotChart with the data.

• The PivotChart will be set up so that, on a single workbook sheet, you can scroll through all the stocks, and a diagram for each of them will be drawn in turn.

• This will be a compact way to store and examine the data. • You will use the PivotTable and PivotChart Wizard to create the table

and the chart, and this Wizard will invoke the Query Wizard when it is time to define the data you want to import.

Page 223: Microsoft Excel

Microsoft Excel 223

XPStart the PivotTable and PivotChart wizard

• First, choose or create an empty worksheet. • From the Data menu choose PivotTable and PivotChart Report. • When the Wizard comes up with the dialog box labeled Step 1 of 3,

choose External data source and PivotChart report (with PivotTable report), then click Next.

• This will bring up Step 2 of 3 of the Wizard. Click the Get Data button. This will bring up the Query Wizard - Choose Data Source dialog box.

• Choose the data source type, and click OK. Select your database from its folder on the Data Disk, and click OK. Select your table in the list of tables.

– If you click Add, the Query Wizard will add all of the columns in the selected table to the Columns in your query: box

– If you do not want to filter or sort the data, you can click Next repeatedly until you have reached the end of the Query Wizard, and have returned to Step 2 of 3 in the PivotTable and PivotChart Wizard

Page 224: Microsoft Excel

Microsoft Excel 224

XPSet the PivotTable layout

• Click Next to go to Step 3 of 3. Here, choose the Existing worksheet option, and click the cell where you want to start the PivotTable.

• Click Layout, which will bring up a Layout dialog box, on which you will design the PivotTable.

• You can drag the buttons on the right side of the dialog box to the diagram on the left side.

• You can change the words on the column labels by double clicking on the fields and using the Name text box.

• Also, while you are in the PivotTable Field dialog box, you can format fields as a number.

Page 225: Microsoft Excel

Microsoft Excel 225

XPThe Layout dialog box

In the dialog box shown here, you can drag the field buttons on the right into the proper places on the diagram until your PivotTable looks like you want it to.

Page 226: Microsoft Excel

Microsoft Excel 226

XPFinish the Pivot Table

• In the Step 3 of 3 dialog box, you can click Options so that selected columns or rows are not selected.

• You should also select Refresh on open in this dialog box.

• Click OK and Finish.

• You have designed a PivotTable and PivotChart, and a query to get the data to go in them.

• The PivotTable will be on a worksheet called Recent Results; the PivotChart will be on a sheet called Chart1 for the example created here.

Page 227: Microsoft Excel

Microsoft Excel 227

XPExample PivotTable and PivotChart

This figure shows a completed PivotTable and a PivotChart.

Page 228: Microsoft Excel

Microsoft Excel 228

XPRetrieve stock market data from the Web

• To access a web page, you must know the URL. • The URL of a web page is its address, the place

the network browser goes to find the page. • Web pages stored on the Web usually (although

not always) have a URL that starts with http://www.

• Web pages can also be accessed from a disk instead of from the Web.

Page 229: Microsoft Excel

Microsoft Excel 229

XPBegin the Query Wizard

• To create a Web query, find or create a new worksheet in your Excel workbook.

• Point to the cell where you want the imported information to start.

• From the Data menu, choose Import External Data, and then New Web Query.

• The Query Wizard will invoke your Web browser, and open your home or default Web page.

• Type in the address of the HTML file to be used.

Page 230: Microsoft Excel

Microsoft Excel 230

XPImport the Web page data

• When the Web page is opened with the Query Wizard, the Wizard puts little selection arrows in front of each section.

• As you click on the sections you want to import, the arrow changes to a check mark.

• There is a selection arrow at the top of the page; you select this arrow to select the entire page.

• Click on the arrows that point to the tables on the Web page, and then click Import.

• Check the address in the Import Data dialog box, and click OK.• The Query Wizard has created a query to select the parts of the Web

page you want, and has imported the data into your worksheet.

Page 231: Microsoft Excel

Microsoft Excel 231

XPAn imported Web page

This figure shows the worksheet with the imported data. The External Data toolbar is visible, offering you some options for accessing the data.

Page 232: Microsoft Excel

Microsoft Excel 232

XPImport pages with HTML formatting retained

• One of the options on the External Data toolbar is to Edit Query.

• You can edit the query to import the data with all its HTML formatting features, such as complicated table structures, and hyperlinks.

• From the Edit Web Query page, select Options, and from the Web Query Options page, select Full HTML formatting. Select OK, and then Import.

• You can save a Web query, and then use it in any Excel workbook To do so:

– Select the Edit Query button from the External Data toolbar, and select the Save Query button

– Key in the path to the folder where you want the query to be saved, and give it a name

Page 233: Microsoft Excel

Microsoft Excel 233

XPAn imported Web page with its HTML formatting

This figure shows the same page seen in a previous slide imported with full HTML formatting.

Page 234: Microsoft Excel

Microsoft Excel 234

XPImport stock quotes

• There are some Web queries that Microsoft provides for you. One of these is the Microsoft Investor Stock Quotes query.

• From the Data menu, choose Import External Data, then choose Import Data.

• This will bring up the Select Data Source dialog box, where you will see a list of available queries.

• Choose MSN MoneyCentral Investor Stock Quotes, and click Open.

Page 235: Microsoft Excel

Microsoft Excel 235

XPEnter parameters for the Stock Quote query

• In the Import Data dialog box, click Parameters. In the Parameters dialog box, notice that you can choose Get the value from the following cell:, and then enter a cell address or range.

• If you have already imported the list of ticker symbols for a list of stocks into a worksheet, you can read the ticker symbols from that worksheet.

• Click Get the value from the following cell:, click Collapse Dialog Box, open the worksheet where the ticker symbols are listed, highlight them, and press Enter.

• Click OK twice to activate the Web query. If you have an open connection to the Web, the query will get and display the current stock information for the stocks whose ticker symbols you entered.

Page 236: Microsoft Excel

Microsoft Excel 236

XPA worksheet with stock quotes imported from the Web

This figure shows a worksheet with imported stock data. Since this data is constantly changing, it is informative to refresh it, which you can do with the Refresh button on the External Data toolbar.

You can also set an automatic refresh interval from the External Data Range Properties dialog box.

Page 237: Microsoft Excel

Microsoft Excel 237

XPUse hyperlinks to view information on the World Wide Web

• Sometimes text from a Web page is underlined in blue.

• This indicates that the text is a hyperlink. • A hyperlink is any text or spot on a page that,

when you click on it, takes you to another location.

Page 238: Microsoft Excel

Microsoft Excel 238

XPA worksheet with hyperlinks

The hyperlinks on the imported data in this figure are links to pages on the Web containing information about the various stocks.

Clicking on one of them activates the Web browser, which reads the hyperlink containing the address of the Web page, and opens it.

Page 239: Microsoft Excel

Microsoft Excel 239

XP

Microsoft Excel

8 – Excel Shortcut Keys and Cheat Sheet

Page 240: Microsoft Excel

Microsoft Excel 240

XP

Sr. No. Key Effect

1 → Move right by one cell

2 ← Move left by one cell

3 ↓ Move down by one cell

4 ↑ Move up by one cell

5 Ctrl+→ Move to extreme right column( IV) in current row

6 Ctrl+← or Home Move to extreme left column (A) in current row

7 Ctrl+↓ Move to bottom-most row(65536) in current column

8 Ctrl+↑ Move to top-most row (1) in current column

9 Ctrl+Home Move to the first cell (A1)

10 PgDn Move down on screen

11 PgUp Move up one screen

12 Alt+PgDn Move right by one screen

13 Alt+PgUp Move Left by one screen

14 Ctrl+PgDn Move to next sheet

15 Ctrl+PgUp Move to previous sheet

16 Ctrl+G Opens Goto window then specify the cell reference to move to

Excel Shortcuts Keys - For moving through Worksheet

Page 241: Microsoft Excel

Microsoft Excel 241

XP

Excel Shortcuts Keys - For moving Selecting a range of cells

Sr. No. Key Effect

1 Shift+→ Selects a range of cells horizontally

2 Shift+← Deselects a range horizontally

3 Shift+↓ Selects a range of cells vertically

4 Shift+↑ Deselects a range of cells vertically

5 Shift+PgDn Selects a screen-full of cells vertically in that row

6 Shift+PgUp Deselects a screen-full of cells vertically in that row

7 Alt+Shift+PgDn Selects a screen-full of cells horizontally in that column

8 Alt+Shift+PgUp Deselects a screen-full of cells horizontally in that column

9 Ctrl+Shift+Spacebar Selects all cells in worksheet

10 Ctrl+Shift+Home Selects all cells from current cell to cell A1

Page 242: Microsoft Excel

Microsoft Excel 242

XP

Key Alone Shift Ctrl Alt Shift CtrlF1 Help What's This Help Insert Chart SheetF2 Edit Mode Edit Comment Save AsF3 Paste Name Formula Paste Function Define Name Names From LabelsF4 Repeat Action Find Again Close Window Quit ExcelF5 Goto Find Restore Window SizeF6 Next Pane Prev Pane Next Workbook Switch To VBA Prev WorkbookF7 Spell Check Move WindowF8 Extend Selection Add To Selection Resize Window Macro ListF9 Calculate All Calculate Worksheet Minimize WorkbookF10 Activate Menu Context Menu Restore WorkbookF11 New Chart New Worksheet New Macro Sheet VB EditorF12 Save As Save Open Print

Excel Cheat Sheet

Page 243: Microsoft Excel

Microsoft Excel 243

XP

F10 Activate Menu Context Menu Restore WorkbookF11 New Chart New Worksheet New Macro Sheet VB EditorF12 Save As Save Open PrintA Select All Formula ArgumentsB BoldC CopyD Fill Down Data MenuE Edit MenuF Find File Menu Font NameG GotoH Replace Help MenuI Italics Insert MenuJK Insert HyperlinkLMN New WorkbookO Open Workbook Format Menu Select CommentsP Print Font SizeQR Fill RightS SaveT Tools MenuU UnderlineV PasteW Close Workbook Window Menu

Key Alone Shift Ctrl Alt Shift Ctrl

Excel Cheat Sheet

Page 244: Microsoft Excel

Microsoft Excel 244

XP

` (~) Toggle Formula View General Format1 (!) Cell Format Number Format

2 (@) Toggle Bold Time Format3 (#) Toggle Italics Date Format4 ($) Toggle Underline Currency Format5 (%) Toggle Strikethru Percent Format6 (^) a Exponent Format7 (&) a Apply Border8 (*) Outline Select Region9 (() Hide Rows Unhide Rows0 ()) Hide Columns Unhide Columns

- Delete Selection Control Menu No Border= (+) Formula Auto Sum Insert dialog

[ Direct Dependents Direct Precedents] All Dependents All Precedents

; (semicolon) Insert Date Select Visible Cells Insert Time' (apostrophe) Style Copy Cell Value Above

: (colon) Insert Time/ Select Array Select Array\ Select Differences Select Unequal Cells

Insert Insert Mode CopyDelete Clear Delete To End Of LineHome Begin Row Start Of WorksheetEnd End Row End Of Worksheet

Page Up Page Up Previous Worksheet Left 1 screenPage Down Page Down Next Worksheet Right 1 screenLeft Arrow Move Left Select Left Move Left Area

Right Arrow Move Right Select Right Move Right AreaUp Arrow Move Up Select Up Move Up Area

Down Arrow Move Down Select Down Move Down Area Drop down listSpace Bar Space Select Row Select Column Control Box Select All

Tab Move Right Move Left Next Window Next Application Previous WindowBackSpace Goto Active Cell

Key Alone Shift Ctrl Alt Shift Ctrl

Excel Cheat Sheet

Page 245: Microsoft Excel

Microsoft Excel 245

XP

Queries

Page 246: Microsoft Excel

Microsoft Excel 246

XP

Thank You

Microsoft Excel

Mohan BangMohan Bang