
Tips.Net > ExcelTips Home > Charts > Creating Charts > Specifying Chart Sizes
Summary: When Excel creates a chart in a worksheet, it sets the initial size of the cart based on a variety of factors. If you add multiple charts to a worksheet, you may want those charts to all be the same size. There are a couple ways to accomplish this task, each explored in this tip. (This tip works with Microsoft Excel 97, Excel 2000, Excel 2002, and Excel 2003.)
Megan has a monthly report that she creates in Excel. She has most of the report automated, except for one annoying problem that she must handle manually. The report includes four pie charts used to illustrate some values from the report. Each pie chart comes out a bit different in size, and the manual task is that Megan needs to make them all the same size. She wants each of them to be 5 centimeters square, and would love a way to remove the manual drudgery of formatting them each month.
The reason that each of the pie charts is a little bit different in size is because when you create a chart with the default settings, Excel decides it can adjust the chart size as it sees fit. This sizing can depend on several factors, such as available space, label sizes, number of data points, etc. One way to improve the chances that each chart will be the same size is to create your first chart and then use Ctrl+C and Ctrl+V to copy the chart the other three times. Each should be identical, and then you can adjust the data ranges reflected in the charts so that they display the desired ranges.
If it is not practical to copy and paste the carts (for instance, if the charts are created by macros), then you may be interested in just using a quick macro to adjust the size of all the charts in the worksheet. The following macro will step through each chart and adjust the Height and Width properties to 5 centimeters.
Sub AdjChartSizes()
Dim cht As ChartObject
For Each cht In ActiveSheet.ChartObjects
cht.Chart.ChartArea.AutoScaleFont = False
cht.Height = Application.CentimetersToPoints(5)
cht.Width = Application.CentimetersToPoints(5)
Next cht
End Sub
Tip #2429 applies to Microsoft Excel versions: 97 2000 2002 2003
Tame Your Data! ExcelTips: Filters and Filtering provides all the details necessary to let you manage large sets of data with confidence and ease. Its information-packed pages demonstrate how to use the two types of filters provided by Excel: AutoFilters and advanced filters.
Check out ExcelTips: Filters and Filtering today!
Thousands of ExcelTips, available for immediate download. Have all the Microsoft Excel info you need, right at your fingertips. (more information...)
Ask an Excel Question
Make a Comment
ExcelTips FAQ
ExcelTips Premium
Beauty Tips
Bugs and Pests Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Money Tips
Organizing Tips
Pet Tips
Word2007 Tips
WordTips
Advertise on the
ExcelTips Site