Specifying Chart Sizes in Inches

Written by Allen Wyatt (last updated August 9, 2025)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Excel in Microsoft 365


1

When Tonya creates charts, most all of them are embedded in a worksheet. Excel sizes the charts based on the data in the chart, which means they are often different sizes. Tonya needs to click and drag the sizing handles to adjust the chart sizes, which is tedious. She wonders if there is a way she can specify a size for the embedded charts in inches. This would make her work much easier.

If you just have a couple of charts to size, the easiest way is to follow these steps:

  1. Click once on the chart to select it. Excel displays adds two new tabs to the ribbon.
  2. Display the Format tab of the ribbon. (This is one of the two new tabs added to the ribbon after step 1.)
  3. At the right end of the ribbon, specify a Height and Width in inches.

Easy, right? There's another easy way—click once on the chart and then press Ctrl+1. Excel displays, at the right side of the screen, the Format Chart Area task pane. Click the Size & Position icon, and then make sure the Lock Aspect Ratio check box is cleared. You can then specify the desired chart size in inches.

If you have many more charts to resize, or if you have to perform the task quite often, then a macro-based solution may be best for your needs. Here's a version that will work on whatever chart is currently selected:

Sub ResizeSelectedChart()
    Dim Height As Single
    Dim Width As Single

    ' Set width and height to standard values
    Width = 6.25
    Height = 4.1

    If TypeName(Selection) = "ChartArea" Then
        With ActiveChart.Parent
            .ShapeLockAspectRatio = msoFalse
            .Width = Width * 72
            .Height = Height * 72
        End With
    Else
        MsgBox "Chart not selected", vbExclamation
    End If
End Sub

Note that you cannot select an object within the chart; you must select the entire chart before running the macro. It sets the width and height according to the values you store in the Width and Height variables. Specifically, the Width and Height variables are multiplied by 72 because the Width and Height properties expect values to be specified in points. Notice, as well, that the macro sets the ShapeLockAspectRatio property to msoFalse. This is done just in case the aspect ratio has been locked for the chart.

If you prefer to have the macro affect all embedded charts in the entire workbook, then the following will work fine:

Sub ResizeAllEmbeddedCharts()
    Dim ws As Worksheet
    Dim ch As ChartObject
    Dim Height As Single
    Dim Width As Single

    ' Set desired size in inches
    Width = 6.25
    Height = 4.1

    ' Loop through each worksheet in the workbook
    For Each ws In ThisWorkbook.Worksheets
        For Each ch In ws.ChartObjects
            With ch
                .ShapeLockAspectRatio = msoFalse
                .Width = Width * 72
                .Height = Height * 72
            End With
        Next ch
    Next ws

    MsgBox "All embedded charts have been resized.", vbInformation
End Sub

If your workbook contains any chart sheets (charts that are not embedded), they will not be affected by the macro.

Note:

If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (13950) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Excel in Microsoft 365.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Quickly Accessing Spelling and Grammar Options

You can change the way Word handles spelling and grammar checks through the menus. But there is a quicker way to access ...

Discover More

Determining the RGB Value of a Color

Excel allows you to fill a cell's background with just about any color you want. If you need to determine the RGB value ...

Discover More

Gradient Prints as Stripes

When you print a graphic that includes a gradient, you may not get exactly the output you expect. This tip examines two ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 365 applications with VBA programming. Written in clear terms and understandable language, the book includes systematic tutorials and contains both intermediate and advanced content for experienced VB developers. Designed to be comprehensive, the book addresses not just one Office application, but the entire Office suite. Check out Mastering VBA for Microsoft Office 365 today!

More ExcelTips (ribbon)

Using Dynamic Chart Titles

Want the title of your chart to change based upon what is placed in a worksheet cell? It's easy; just add a formula to ...

Discover More

Creating Sparklines

Want a cool, small chart to show what your data is doing? You need a sparkline, discussed in this tip.

Discover More

Negatives in Pie Charts

Pie charts are a great way to graphically display some types of data. Displaying negative values is not so great in pie ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 5 - 4?

2025-08-09 10:31:29

J. Woolley

The Tip's second macro references ThisWorkbook, so it can only be applied to charts in the workbook that contains the macro. That will be a problem if the macro is relocated to Personal.xlsb or an add-in. To avoid the problem, the following statement
    For Each ws In ThisWorkbook.Worksheets
should be replaced by this statement
    For Each ws In ActiveWorkbook.Worksheets
so the macro can be applied to charts in any workbook that has been activated.


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.