Apply Size and Aspect Ratio Properties to Multiple Excel Charts
Question details
The user wants to change properties and lock the aspect ratio of multiple Excel charts without editing each one separately.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet contains multiple charts that need consistent size settings.
- Observed behavior
- The user wants chart properties applied to multiple chart objects at once.
Identify the worksheet and charts you want to update. If you use the macro below, it will affect every embedded chart on the active worksheet.
Use a VBA macro to update all charts on a worksheet
Use this method in desktop Excel to lock the aspect ratio and set a common width for every embedded chart on the active worksheet.
The macro works with embedded charts on the active worksheet, not separate chart sheets. Locking the aspect ratio preserves each chart's existing proportions, so charts may have different heights after being given the same width.
In desktop Excel, select the worksheet containing the charts you want to change.
Open the Developer tab and select Visual Basic, then choose Insert > Module in the VBA editor.
Paste this code into the module: Sub ResizeWorksheetCharts() Dim co As ChartObject For Each co In ActiveSheet.ChartObjects co.ShapeRange.LockAspectRatio = msoTrue co.ShapeRange.Width = Application.InchesToPoints(5) Next co End Sub
In the line containing InchesToPoints(5), replace 5 with the desired width in inches. Delete that line if you only want to lock the aspect ratios without resizing the charts.
Return to the target worksheet, select Developer > Macros, choose ResizeWorksheetCharts, and select Run. Check several charts to confirm the result.

Try applying size settings to selected Excel charts
Use the formatting controls if your Excel version supports applying the desired settings to multiple selected chart objects.
Work with spreadsheet charts in WPS Office
WPS Office is a free, lightweight alternative with a familiar interface for opening and editing Excel-format spreadsheets. It can help you migrate your spreadsheet work, but it does not change Microsoft Excel's chart settings.

Frequently Asked Questions
Can I lock the aspect ratio without changing chart sizes?
Yes. In the VBA macro, remove the line that sets ShapeRange.Width, then run the macro from Developer > Macros. It will lock the aspect ratio of each embedded chart without setting a new width.
Will the macro change charts on other worksheets?
No. The macro uses ActiveSheet.ChartObjects, so it changes only embedded charts on the worksheet that is active when you run it.
Why do my charts have different heights after I set one width?
With Lock aspect ratio enabled, each chart retains its existing proportions. Charts with different original proportions can therefore have the same width but different heights.
Can I run the VBA macro in Excel for the web?
No. Open the workbook in desktop Excel to add and run the macro through the Developer tab.




