Functions and Charts in Microsoft Excel

19

Click here to load reader

description

This walkthrough shows you some of the basics of creating functions and charts in Microsoft Excel. Using a fictional payroll report, you will learn how to create simple functions, conditionals functions, and even some simple charts with which to display your data.

Transcript of Functions and Charts in Microsoft Excel

Page 1: Functions and Charts in Microsoft Excel

Functions &

Charts in

Microsoft Excel

Objective

Among the most unique and exciting features of Microsoft Excel are its complexfunctions. In this class, you will learn to construct functions in Excel 2002. We willcreate a fictional payroll report to demonstrate how to use functions in Excel. You willlearn some basic functions, including addition and multiplication, as well as morecomplicated “conditional” functions such as IF. During the class, we will also show yousimple techniques for changing a cell’s category, copying functions, and making sure yourfunctions work the way you want. To conclude the class, you will also receive a basicoverview of creating simple charts of your data. You will learn how to select the righttype of chart and customize them to be more attractive and useful.

Outline

Changing Cell Categories.....................................................................................2Inserting a function.............................................................................................3All about functions..............................................................................................4Entering functions manually.................................................................................6Copying functions................................................................................................6Relative versus absolute references.......................................................................7Conditional functions...........................................................................................8Nested functions.................................................................................................9Using text in functions.......................................................................................10Intermission for some tidying.............................................................................11Creating your chart...........................................................................................11The Chart Wizard and selecting a chart type.........................................................12Chart Options...................................................................................................13Editing your chart..............................................................................................15Different charts, different options........................................................................17Further customization options.............................................................................18

Functions & Charts in Excel, p.1

Page 2: Functions and Charts in Microsoft Excel

Excel functions allow you to make complicated calculations quickly and easily. We aregoing to see a bit of what functions can do by creating a fake payroll report for ourworkplace. Please enter the data below into a blank Excel spreadsheet as displayed.Adjust the font styles and sizes to your preference.

Hint: Are you finding that the employees' names are getting cut off because the columnis too thin? You can automatically adjust the size of a column by double-clickingthe right-most edge at the top of the column.

Changing Cell Categories

Before we begin analyzing our data, it would help to make it a little easier to read. Forinstance, it would be nice if our “Pay Rate” column were actually in dollars and cents.Fortunately, Excel saves us from typing in all those dollar signs by allowing us to changewhat’s called the “cell category.” The cell category represents how Excel “thinks” aboutthe data that’s in a specific cell: whether it’s a date, a number, text, dollars & cents, etc.

1. Begin by highlighting the prices in the “Pay Rate” column.

2. Next, move your mouse cursor over“Format” in the menu bar and clickthe left mouse button. This willopen the format menu, shown to theright.

3. Move your mouse over the “Cells”option and left click. This will openthe “Format Cells” window shownbelow.

Functions & Charts in Excel, p.2

Page 3: Functions and Charts in Microsoft Excel

This is the “Format Cells” dialog box, which allowsyou change various aspects of a cell including thefont, borders, and appearance. It also allows usto change the category of a cell, i.e., how Exceldisplays and “reads” the data in the cell.

4. To continue changing our cellcategory, select “Currency” fromthe left-hand box and click OK.This will automatically change allof our highlighted cells to dollars& cents, as on the right. Noticethat you can also have Excelround to the nearest dollar, tendollars, etc.

Inserting a function

Now that we’re working in dollars & cents, we can insert our first function. Functions canbe as simple as adding a few cells together or as complex as performing statisticalanalysis. We’re going to start off simple with the SUM function. SUM adds the contentsof cells together. This function will be useful for telling us how many hours have beenworked this pay period.

Hint: Remember, the letter in a cell reference (e.g. A1, F26, etc.) always refers to thecolumn, and the number refers to the row.

1. Begin by positioning your selection box in cellD15, just to the left of the “Total:” entry.

2. Next, move your mouse cursor over “Insert”in the menu bar and click the left mousebutton. This will open the Insert menu,shown to the left.

3. Move your mouse over the “Function” optionand left click. This will open the “InsertFunction” window shown below.

The “Insert Function” box gives you access to all of the functions that Excel has to offer,which is a rather extensive list. It divides them into categories, listed in the drop-downmenu just below the “Search for a function” box. Thus, if you only want functions relatedto the date & time, you can select that category and the functions in that category will belisted in the box below.

Functions & Charts in Excel, p.3

Page 4: Functions and Charts in Microsoft Excel

On the bottom of the window, Excel brieflyexplains the highlighted function and(somewhat cryptically) how to input it.

4. To continue entering our function, select“All” from the category drop-down menu.This lists all of the functions that Excelhas to offer. Scroll down to “SUM” in thebottom box and click on it.

5. Click “OK.” This will close the “InsertFunction” window and open the boxshown below.

Here, Excel is asking us, in itscomplicated way, what we’d like tosum. Once again, Excel gives ushints on what the function does andhow it works. At the bottom of the“Function Arguments” window, youwill also get a preview of the resultof your function. You can move the“Function Arguments” box out of theway by clicking and holding your leftmouse button and dragging the boxsomewhere more convenient.

6. Instead of adding numbers, as Excel's sample suggests, we’re actuallygoing to add a range of cells. Using your mouse, highlight cells D5 throughD15. Highlighting the cells will cause a dashed line to appear around them,as shown at right.

7. Click “OK” on the function box. Excel has now just added together thenumber hours worked for us!

Hint: Did that take too long? We’re learning the “long way” of inserting functions, butyou can also click the AutoSum icon to quickly insert a SUM function.

All about functions

Now that we've inserted a function, let's learn more about them. Begin by clicking on thecell D15. When you look at this cell in the spreadsheet itself, you see a number (in theexample above, it's 579). However, what this cell actually contains is a function. Youcan tell this because the value shown in the “Formula Bar,” just below the toolbars at thetop of your screen, is different.

Functions & Charts in Excel, p.4

Page 5: Functions and Charts in Microsoft Excel

This text is the function as Excel sees it. This particular function adds together thevalues in cells D5 through D14. While each function in Excel is slightly different, they have manysimilar elements. These elements are shown below.

Function Argument Data

= SUM (D5:D14)

In addition to the functions that you can choose from the “Insert Function” dialog window(which are numerous), Excel can also perform basic mathematical and logical operations.Here are a few that may be useful. Remember, however, that functions must always startwith an equal sign. Otherwise, Excel won’t recognize your entry as a function.

Operator Name Example Result

+ Addition 1+1 2

- Subtraction 2-1 1

- Negation -2 -2

* Multiplication 2*2 4

/ Division 4/2 2

% Percent 10% 0.1

^ Exponents 10^2 100

= Equal to 2=1 FALSE

> Greater than 2>1 TRUE

< Less than 2<1 FALSE

>= Greater than or equal to 2>=1 TRUE

<= Less than or equal to 2<=1 FALSE

<> Not equal to 2<>1 TRUE

Functions & Charts in Excel, p.5

The argument tells Excel what you

want it to do (e.g. add, multiply,

count, etc.)

Data (which could be cells or numbers)

are what you’d like to have added,

multiplied, etc.

The equal sign tells Excel that you want

to enter afunction, not a

piece of data.

Page 6: Functions and Charts in Microsoft Excel

Hint: The numberpad (the set of keys on the right side of your keyboard) is your friendin Excel. In addition to enabling you to type numbers quickly, it also includesseveral basic mathematical operators (e.g. add, multiply, etc.).

Entering functions manually

You don’t have to use the “Insert Function” window to enter functions. If you know whatyou’d like to enter and how it works, you can type it in yourself. To practice this, we’regoing to calculate the gross pay for each employee.

1. To begin, move your selection box to cell E5, just under “Gross Pay.”

2. Type “=”.

3. Next, click cell C5 (Frank Anderson's hourly wage. It should read “$14.96”).

4. Type “*”. The asterisk is Excel speak for multiply.

5. Click cell D5 (The number of hours Frank worked, which should be 80).

6. Press “Tab” to complete the function. It should look like this: =C5*D5. The resultshould be $1,196.80.

Copying functions

Of course, that the function only calculates Frank's gross pay; it would help if itcalculated everyone's gross pay. It would be really tedious to insert the function againfor each cell. Fortunately, there’s an easier way to do this.

1. Begin by moving your selection box to cell E5, where we just typed the function.

2. Move your mouse cursor over the little black square in the corner of the cell.

3. Your cursor should turn into a small black cross. When it does, click and hold yourleft mouse button and highlight cells D6 through D14.

4. Ta da! Now Excel has calculated everyone's gross pay.

Your Turn: Now that you've learned how to copy functions, do the same thing for thefunction in cell D15 (the total hours) and copy it into cells E15 through I15.Don't worry that there's no data to sum just yet.

Functions & Charts in Excel, p.6

Page 7: Functions and Charts in Microsoft Excel

Relative versus absolute references

Up to now, Excel has been pretty smart. It knew that when we copied the function tocalculate gross pay, we wanted it to calculate it for that row, not just recalculate it forFrank. Sometimes this habit of Excel's isn't so smart, though, as we'll soon see.

In addition to gross pay, we have to calculate taxes and required retirementwithholdings. To set us up to do this, click on cell A17, two cells below “Smith, Joseph.”Type “Tax rate:”. Type “0.33” in cell B17. Now, click on cell A18 and type “Retire:” andtype “0.08” in cell B18. Those are the rates for taxes and retirement respectively. Tomake this easier, we'll say everyone has the same rates.

Your turn: It would be nice if the tax and retirement rates were in percentages. Usewhat you learned earlier in the class to change the cell categories for thetwo rates to percents, with no decimal places.

First off, let's calculate the taxes. To do this, we need to multiply the gross pay by thetax rate. Start off by clicking on cell F5 and enter the following function.

=E5*B17

The result should $394.94. Looks good, right? Now, using what you've learned, copythe function down through cell F14.

Uh oh! We must have done something wrong, because when we copy the functiondown to the other cells, it looks like the picture at the right.

To see what’s wrong, click on cell F6 and then look at your formula bar. Thefunction should look like this:

=E6*B18

But wait a minute! Cell B18 is the retirement rate, not the tax rate! When we copied thefunction into different cells, Excel assumes that we want to change which rows we’remultiplying, too. This habit worked great to switch to a different employee's gross pay.However, we don't want Excel to change which cell it's using for the tax rate; that staysthe same regardless.

What we need to do now is insert what’s called an absolute reference. With an absolutereference, Excel will always use the value from the same cell (or row or column) nomatter where you copy the function. With a relative reference (the opposite of anabsolute one), Excel changes which rows and columns it uses to compute the function.

1. Move your selection box to cell F5, where we began the function.

2. Click inside the Formula bar and change the function to look like this: =E5*$B$17

Functions & Charts in Excel, p.7

E5 is Frank's gross pay B17 is the tax rate

Page 8: Functions and Charts in Microsoft Excel

3. Copy the new function down through cell F14 to delete the incorrect function wemade before.

Placing a dollar sign in front of the column (the letter) and the number (the row) tellsExcel to not change which cell it’s using. Since we placed dollar signs in front of the “B”and the “17,” Excel will always use cell B17 when calculating this formula. If we had puta dollar sign only in front of the “17,” Excel would have always used row 17 but wouldchange the column if we copied the function into another column.

Conditional functions

So far, we've been entering pretty simple functions that don't vary. However, we can alsohave Excel make different calculations under different conditions. Such functions arecalled “conditional” functions, not surprisingly. We'll start off with the most basic ofthem: the IF function.

Here's the scenario. All employees, even part-time ones, have health coverage. If theywork more than half-time in a pay period, their contribution is only $20 per pay period.If they work less than half-time in a pay period, the contribution increases to $100.Assume that the pay period is two weeks. We could manually enter the amount bylooking at the number of hours worked and typing the correct health insurancecontribution. However, we can also have Excel figure it out for us. That's just what we'regoing to do, using the IF function.

The IF function is entered as follows:

=[What you want is true or false, the value if it's true, the value if it's false]

In this case, what we want to know is whether an employee has worked more than 40hours in a pay period. If s/he has, then the health insurance contribution is $20. If not,then the contribution is $100. With this information, we can start entering the newfunction. We'll use the “Insert Function” dialog box to enter it this time.

1. Select cell G5, just under “Health.”

2. Click on the “Insert” menu at the top of the screen, thenclick “Function.” The insert function dialog box will open.

3. You can find the IF function quickly using the categories.IF is what's called a “Logical” function, meaning itassesses whether something is true or false. Click thearrow next to the “select a category” box and click“Logical.”

4. Double-click “IF” in the resulting list. It will open the “Function Arguments” boxshown below.

Functions & Charts in Excel, p.8

Page 9: Functions and Charts in Microsoft Excel

5. Move the “Function Arguments” boxto a more convenient location.Then, click cell D5 (in the Hourscolumn). The entry “D5” shouldappear in the “Logical_test” box.Type >40 immediately after it. Here,we're asking Excel to see if thenumber of hours worked in cell D5 isgreater than 40.

6. Click inside the “Value_if_true” boxand enter 20 (the amount for peoplewho worked more than half-time).

7. Click inside the “Value_if_false” box and enter 100 (the amount for people whoworked less than half-time). The completed box should appear as in thescreenshot above.

8. Click “OK.”

9. Copy the function in cells G6 through G14.

Now Excel will automatically determine which amount each person needs to contributefor health insurance.

Nested functions

Conditional functions are not only useful for returning specific values (e.g. “20”). Theycan also make different calculations depending on whether your conditions are met. Youcan accomplish this by “nesting” functions, that is, by having functions placed withinother functions.

We can nest functions by using our good friends, parentheses. If you remember back toyour math classes, things inside parentheses need to be done first. That’s how Excelworks, too. Parentheses are really important when constructing complex functions.We're going to try it now to calculate the employees' retirement contributions.

At our fictional company, only full-time staff participate in the retirement program. Theyare required to contribute 8% of their gross pay to the retirement program. Thus, weneed Excel to distinguish between full- and part-time staff. Fortunately, we already knowthat the IF function is good for making such distinctions.

1. Select H5, just under “Retire.”

2. Enter the following function. Use the Formula bar this time, to make it quicker.Below the function is a deconstruction of what it means.

Functions & Charts in Excel, p.9

Page 10: Functions and Charts in Microsoft Excel

=IF(B5=Full,(E5*$B$18),0)

Notice that the IF function has another function (multiplying the gross pay by theretirement contribution rate) nestled within it. Also, notice the absolute references in itto ensure we don't run into the same problem as when we calculated the taxes.

3. Press “Enter” to complete the function.

Using text in functions

Once again, things must not be quite right with this functionbecause we got an odd error: This is Excel's strangeway of telling you that you did something wrong.

If you click back onto the cell with the function and moveyour mouse over the small black down arrow to the left ofthe cell, you can get more information on the problem. Youroptions are shown in the picture to the right. If you mouseover “Help on this error” and click on it, you'll find that theproblem we're having here is that Excel doesn't understandthe text in the function.

Most functions are mathematical or statistical operations. Hence, Excel generally expectsto see numbers. It's often not smart enough to tell the difference between text andnumbers. Thus, you have to tell it when your data is numerical. We can do this withquotation marks. To make our function in cell H5 work, reenter it as follows:

=IF(B5=”Full”,(E5*$B$18),0)

Now, what we're telling Excel is the following: If you see the text “Full,” then return thegross pay multiplied by 8%. If you don't see “Full,” then return 0.

Now that we've fixed the function, copy it down through the rest of column H. For extra credit (using what we've already learned), change the cell category in column Hto currency and make everything right-aligned using the button.

Your turn: Now that you've learned about functions, insert a function to calculate thenet pay in column I by subtracting the taxes, health insurance, andretirement contributions from the gross pay. Try nesting a SUM functionwithin the function to subtract from gross pay.

Functions & Charts in Excel, p.10

then their retirement contribution is 8% of

their gross pay.

If the employee is full-time . . .

If they're part-time, then just put “N/A.”

Page 11: Functions and Charts in Microsoft Excel

Intermission for some tidying

Now that we've completed calculating our payroll, we can start displaying it a bit morevisually by making charts. Before we do that, though, it would be nice to clean up ourspreadsheet a bit. As we were inserting our functions, we sometimes messed up ourgridlines or didn't make Excel display our data in dollars and cents. Using what you'velearned in this class and what you've already learned, clean up the worksheet a bit. Tryto make it look like the worksheet below.

Hint: To fix up the worksheet, you'll need to adjust the cell categories as well as thealignment and borders .

Creating your chart

All right, now we can get down to the business of creating charts. The first and mostimportant thing to consider in creating charts is which part of your spreadsheet you wantrepresented. For instance, in our spreadsheet, including all of the information on onechart would be confusing. However, we can create individual charts for various aspectsof our spreadsheet, such as how much each person was paid or the amount of payrollthat's taken up by taxes, health insurance, etc.

We'll start off by making a simple bar chart of each employee's gross pay. The first thingwe want to do is decide which columns (or rows) we need to have in the chart. To makea chart showing each person's gross pay, we only need to select two columns: “Name”and “Gross Pay.” Selecting the names will ensure that the people's names are includedon the chart. Let's get started!

1. Begin by selecting the “Name” column. To do this, move your mouse over “Name”(cell A4), press and hold your left mouse button, and drag the pointer down the

Functions & Charts in Excel, p.11

Page 12: Functions and Charts in Microsoft Excel

column through A14. Release your left mouse button.

2. Press and hold the “Ctrl” button on your keyboard. This allows you to selectnonadjacent cells with your mouse.

3. While holding “Ctrl,” move your mouse over “Gross Pay” (cell E4), press and holdyour left mouse button, and drag the pointer down the column through E14. Don'tselect the total pay in cell A15! Release your left mouse button. Your selectionshould look like the screenshot below.

4. Click the chart icon on the toolbar to start your chart. You can also insert achart by going to the “Insert” menu, then clicking “Chart.”

The Chart Wizard and chart types

Telling Excel to insert a chart will open the ChartWizard, shown at left. The Chart Wizard walksyou through creating a chart. As you can see,you have a variety of chart types (e.g. bar, pie,etc.) available to you. In addition to those visibleat left, you can also create Cylinder, Cone, andPyramid charts.

Charts can often reveal relationships among yourinformation that are difficult to ascertain with onlynumbers. However, selecting the right chart typeis essential to helping your audience betterunderstand the information you're presenting.For instance, displaying the gross pay of eachemployee as a pie chart might show better therelative amount of the total payroll paid to each

employee, but a bar chart may allow you to compare the amounts more easily.

Functions & Charts in Excel, p.12

Notice that Excel tells you which

columns and rows you've

selected by highlighting the

row and column headers.

Page 13: Functions and Charts in Microsoft Excel

Each chart type also include sub-types. In the example above, we have the Column typeselected. Under the Column chart type, we have 2- and 3-D options as well as stackedcolumns, layered columns, etc.

Now that we've learned a bit about chart types, let's continue makingour Gross Pay chart.

1. Click the “Bar” chart type and left, then select the 3-D option.

2. Click the button.

3. The next part of the Wizard, “Chart SourceData” (shown at left) allows you to customizewhich parts of your spreadsheet you want inthe chart. If you select the correct sectionsbefore opening the Chart Wizard, you generallydon't need to mess around with this section.We'll leave this alone. Click “Next.”

4. The next part of the Chart Wizard allows you to change various options about yourchart. We'll discuss each of these in turn.

Chart Options

The third step of the Chart Wizard opens the window below, where you can fiddle aroundwith your chart by adding titles, labels, etc. Here's and overview of what you can do onthis window.

Functions & Charts in Excel, p.13

A preview of your chart is

displayed that updates as you

change options.

These are the various aspects of your chart you can manipulate. The tab for the option you're

currently changing will appear slightly raised.

Here is where you can change

the parts of the chart, in this

case by adding titles and axis

labels.

Page 14: Functions and Charts in Microsoft Excel

Now we'll continue with editing our chart.

1. On the Titles tab, name your chart “Gross Pay Per Employee.”Name the X axis (in this case, the vertical axis) “EmployeeName” and the Z axis (horizontal) “Gross Pay.”

2. Click the Legend tab. Since we only have one variable in which we'reinterested (gross pay), we don't really need a legend. Uncheck the“Show legend” box to remove it.

3. Click the Data Labels tab. These options allow you to createvarious labels, such as the gross pay amount, on the chart itself.Check the “Value” box to do this.

The other tabs also allow you to do interesting things, although we won't change anyoptions on them for this chart. Axes allows you to change how the axes are displayedand whether the data on them is shown. Gridlines affects whether there are periodiclines on the chart to help people compare bars on the chart. Data Tables allows you todisplay a small table of the data from which you're chart is made. While all of these areuseful in certain instances, we'll bypass them for this chart.

4. Click the “Next” button. The screen below will open.

5. This box lets you determine where your chart will “live” in your spreadsheet. Youhave to options: as an object within the worksheet where your data is (“As objectin”) or as a completely separate tab in your spreadsheet (“As new sheet”). Whichyou choose depends on how you plan on using the chart. Generally, if you plan onprinting or using the chart independent of the data, put it in a new sheet. That'swhat we'll do now. Click the button next to “As new sheet” and name the sheet“Gross Pay chart.” Now your new chart will open!

Functions & Charts in Excel, p.14

Page 15: Functions and Charts in Microsoft Excel

Editing your chart

Now that you have your chart, you may find that you want to change things on it. Thereare various ways you can do this, from making major structural to simple cosmeticalterations.

You can use the Chart toolbar (which is probably floating above your chart somewhere)to make major changes. The Chart toolbar is shown below.

If the chart toolbar is in your way, you can move it by clicking and holding your leftmouse button on the top bar of the toolbar and dragging the chart elsewhere. You caneven “dock” it next to other toolbars.

You can also edit the labels on your chart, such as the title or axis labels. You can editthe font, color, size, and position. To edit an item, simply click on it. Try it now byclicking on your title. You'll notice that the title is nowsurrounded by a box. By clicking and holding your leftmouse button, you can reposition the title anywhere on thepage. You can also change the font style, size, and alignment on the formatting toolbarnear the top of the screen.

Functions & Charts in Excel, p.15

Change the chart type (e.g. bar, line, etc.)

Add a legendor data table

Switch whether the chart is drawn

by the rows or columns of the

source data.

Page 16: Functions and Charts in Microsoft Excel

Editing axis labels is a little different. If you click on one of the labels (tryclicking on “Smith, Joseph), you do not actually select the individual label.Instead, you'll notice that there's a tiny dot on each end of the axis.Like when you clicked on the title, you can now change the font of all of theaxis labels using the formatting toolbar.

If you double-click on an axis label, you'll openthe “Format Axis” box (shown at left), whichgives you more options for adjusting your axis.Double-clicking on any part of your chartgenerally gives you a menu with various optionsyou can change. In this case, the options includechanging the line style, font, cell category(remember that?), alignment, and scale. You canaccess them by clicking the appropriate tab.

Changing the scale let's you adjust how high orlow the numbers go on your chart, as well howoften numerical labels will be inserted betweenthe high and low values. Excel usually justguesses what scale to use, but you may need to

adjust it. For instance, click the “Scale” tab and click inside the box next to “Maximum.”Change the value to $2,000. Click “OK.” Your chart will now go up to $2,000 instead of$1,800.

Finally, you can also adjust the background ofyour chart, known as the “Walls.” Notice how theWalls are currently grey? Double-clicking clickanywhere on the grey area opens the “FormatWalls” box (shown at right). From here, you canchange the line colors and styles using the optionson the left side of the box, and you can change thebackground color on the right side of the box.Change the Wall color to white now by clicking thewhite box on the right.

One final thing we might want to change are the data labels at the endsof each bar. They are somewhat difficult to read where they are currentlylocated. If you click on one, all of them will be selected, as shown at left.Once again, you can now change the font. If you continue to hold your leftmouse button on a data label and drag it, you can move the label.

Unfortunately, you have to move each label individually. However, this may be aneffective way to reposition the labels so that they're more readable.

Play time: Using what you've learned, adjust your Gross Pay chart to make it more toyour liking. When you're finished, click on worksheet “Sheet 1” to go backto our data.

Functions & Charts in Excel, p.16

Page 17: Functions and Charts in Microsoft Excel

Different charts, different options

Now we have a new chart to make: something that shows the proportion of payrollrepresented by the taxes, health insurance contributions, etc. This time, a bar chartdoesn't seem like it will do the job. However, a pie chart might work.

1. Start off by selecting cells F4 through I4. These will be the labels for our piechart. Making the labels part of your selection helps you avoid having to retypethem later in the process.

2. Press and hold the “Ctrl” button on the keyboard and select cells F15 through I15(the totaled amounts for taxes, health insurance, etc.). You don't want to selectthe total for gross pay in this case, however. Why? The proportion of gross pay iswhat our chart will be measuring, so having the total amount in it will mess up thepercentages!

3. Click on the chart icon.

4. Select “Pie” in the “Chart type” box and the3-D pie chart in the “Chart sub-type.”

5. Click “Next” to skip over the Chart Source Data options.

6. Now you'll be in the Chart options. Noticethat we have fewer chart options now thanwe had with our bar chart: no options forAxes, Gridlines, or Data Tables. Youravailable options will depend on the type ofchart you're using.

7. Give your chart an appropriate name.

8. Since we have a pie chart, it may help to include a legend. Click on thelegend tab to change the options. Currently, the legend is located to theright of the chart. Under 'Placement,” click bottom. As you'll notice fromthe preview, this gives us more room for the chart itself.

9. Now click the “Data Labels” tab. Notice that you also have somenew options here, including the “Percentage.” Check the optionsfor “Value” and “Percentage.” You can also adjust how the valueand percentage are separated from each other using the“Separator” options. Click the small down arrow next to“Separator” and select “(new line)” to make the two labels appearon different lines.

Functions & Charts in Excel, p.17

Page 18: Functions and Charts in Microsoft Excel

10. Click “Next” and choose to open your chart in a new worksheet. Name theworksheet whatever you'd like.

11. Click “Finish.” Now you have a another new chart!

Further customization options

A different type of chart also gives you different editing options. For instance, asmentioned before, we now have a legend telling aboutthe different parts of the pie chart. Click on the legend.If you hold your left mouse button and drag, you canreposition the legend wherever you want, as when you edited the title bar in the barchart we made earlier. While you have the legend selected, you can also change the fontas previously discussed. In fact, most of the editing options we discussed while makingthe bar chart are also available here, and they're accomplished using the methods you'vealready learned.

You can also resize the box, if you move the mouse pointer over one of the small dotsthat appear around the legend. When you move your mouse over one of the dots, thecursor will change to a small arrow. Click and hold your left mouse button, then drag thepointer to enlarge or shrink the box.

Finally, you can also edit the coloration of your chart, including its individual elements.For instance, we seem to have two blue-ish shades in our pie pieces (the individualpieces of the pie are called “Series” in Excel). Excel automatically assigns these colors,but we can manually change these if we want. To do this, click on the piece you want to

Functions & Charts in Excel, p.18

Page 19: Functions and Charts in Microsoft Excel

edit. The whole pie chart will be selected. Wait asecond. Now, click on the piece again. Do not double-click the piece initially. If you do this, it will open theoptions for changing the entire chart, not the singlepiece you want. You will notice that the single piece youwant is selected (visible by the dots surrounding it, asshown at left). If you now right-click on the piece, you'llhave the option to “Format Data Point.”

From here, you can change the color of the pie slice, much in the same manner we'vediscussed before. Under the “Pattern” tab of the “Format Data Point” window, you canselect a new color for the slice from the color options on the right. Notice that you alsocan change how the data label appears as well as other “Options,” such as the angle ofyour pie chart.

There are many other options for editing and creating charts in Excel. This class is just avery basic introduction to it. We encourage you to experiment with different options formaking your charts more useful and professional.

Last updated: February 10, 2009, by Buzzy Nielsen

Functions & Charts in Excel, p.19