# Visual Basic > Visual Basic FAQs >  [FAQ's: OD] How to Create Charts & Graphs in Microsoft Powerpoint

## Siddharth Rout

*Creating Charts & Graphs with MS PowerPoint*
_
Tested with Microsoft Excel 2003_

To create Charts and Graphs, Microsoft PowerPoint uses an embedded application, Microsoft Graph. It is very similar to Microsoft Excel and offers many of the same features. When a chart is embedded in a slide, Microsoft Graph can help modify and format the chart.

You can use Microsoft Graph in PowerPoint to create several types of charts, including line, column, area and pie charts.

*Inserting a Graph chart* 

   1. Create a blank slide in the presentation.
   2. Click on Insert=>Chart (See Picture 1 Below). PowerPoint launches Microsoft Graph.


The Graph Standard and Formatting toolbars and menus replace the PowerPoint toolbars and menus.  The datasheet and chart windows appear with default data (See Picture 2) that you can replace with your own data.


You can Close/Open the Datasheet shown in Picture 2 by Clicking View=>Datasheet (See Picture 3)

*
Enter/Edit data in the Datasheet*

Whatever changes that you will make to the Datasheet will automatically reflect in the Chart. For Example If you Change the value of Cell A1 to 50 from 20.4 the graph will get automatically get updated. (See Picture 4)


Similarly you can experiment and change the other values to see the effect on the Chart.

*Import data from Microsoft Excel*

Sometimes you have your data ready in Excel. In this case it is pointless to recreate your data all over again in Datasheet. Microsoft PowerPoint lets you import your data from Microsoft Excel in a very simplified manner.

Steps
1)	Open the Datasheet as shown above, if it is not open
2)	Select the cell above East as shown in Picture 5 below.


3)	Click on the Edit=>Import File as shown in Picture 6 below. This will show you the Import File Dialog Box.


4)	 Select the File that you want to import and click open. You see that you are presented with Import Data Options Dialog box as shown in Picture 7 below


Select the relevant options and Click Ok. If the data is in Sheet1, then select Sheet1 under the Select Sheets From Workbook: heading. If you want to import the entire worksheet then Click the Entire Sheet option under the Import heading. If the data is in a specific Range Say B3:E7 (See Picture 8), then enter that range in the Range Textbox under the Import heading.


Since we are importing data from a different source so we definitely dont want the default data which is present in the datasheet. So Check the Overwrite Existing Cell Checkbox in the Import Data Options Dialog box and click on Ok to exit the Dialog Box. Your Datasheet now looks like as shown in Picture 9. We now need to format it so that we get the desired result.


Delete the data which is not required. Move/Rearrange the data if required. After the formatting lets say the data looks like as shown in Picture 10. You will see that the chart has changed as per the data we have.


*Change the chart type*

Now everything is in place, Our Data, Our Chart. The Chart is showing what we want BUT we dont want a Bar graph, Lets say we want a Line Chart. So now what?

Right click on the Chart as shown in Picture 11 below and select the Chart Type


You will see the Chart Type Dialog box appear as shown in Picture 12 above. Click on the Line Chart under the Chart Type and select a chart you want under the Chart Sub Type Heading. Lets select the Line with 3 D visual Effect Chart. If you want you can click the button Press and hold to view Sample to see how the chart looks like. If you are happy with what you see, click on Ok. Your Chart now looks like as shown in Picture 13. Similarly you can select Pie, Doughnut or any other Chart Type to suit your need.


*Format Chart Area*

Now you have your 3D line Chart, however you want it to look more presentable so what can we do next?

Right click on the Chart as shown in Picture 11 above and select the Format Chart Area. You are then presented with the Format Chart Area Dialog Box as shown in picture 14 below.


Experiment with the different option in the Dialog box. I just selected a color and changed the Font. The Chart now looks like Picture 15.


*Chart Options*

Right click on the Chart as shown in Picture 11 above and select the Chart Options. You are then presented with the Chart Options Dialog Box as shown in picture 16 below.


Experiment with the different options in the Dialog Box. I will go ahead and do the following changes

1)	Titles Tab
   a)Chart Title: Age Comparison
   b) Category (X) Axis: VB Forum Member's
   c) Category (Y) Axis: Age

2)	Data Labels Tab
   a)I Check the Value and Legend Key Checkbox

3)	Click Ok to Exit

My Chart now looks like Picture 17


*Giving The Final Touches*

You can change the Color of the Chart Title or the Axis labels by opening the Format Chart Area Dialog Box as mentioned in the section Format Chart Area. If you want you can even underline the Chart Title or the Axis Title.

You can even Double Click on the Axis Titles to open the Format Axis Dialog Box to change the Color, Font etc

After you have made the relevant changes, if you feel that Now My Chart Is ready, Click anywhere in the slide (outside the chart area) to exit the design mode.

You Final Chart might look like Picture 18 as shown below.

----------


## Hyperion888

Would there be a way to have the data in Excel automatically update in PowerPoint if you updated the Excel file?  Thanks!

----------

