Excel: Format All Chart Series at Once
Question details
The user needs to apply identical line formatting to all series in a chart without editing each series individually.
- Product
- Microsoft Excel desktop
- Device & OS
- not provided
- Scenario
- A chart contains approximately 150 series, and the user wants to set the same line color and weight for every series efficiently.
- Observed behavior
- Formatting each chart series manually is time-consuming because Excel does not provide a single standard command to apply the selected line style to all series at once.
Save a copy of the workbook in the macro-enabled .xlsm format, then click the chart you want to modify so it is the active chart before running the macro.
Use an Excel VBA macro to format every chart series
Use this method when one chart contains many series and you want to apply the same line color and weight in a single operation.
The macro loops through the active chart's SeriesCollection and changes each series line. Replace the sample RGB color and weight with the formatting you need.
In desktop Excel, select the chart, press Alt+F11, choose Insert > Module, and create a standard VBA module.
Paste this code into the module: Sub FormatSeries(): Dim ser As Series: Application.ScreenUpdating = False: For Each ser In ActiveChart.SeriesCollection: With ser.Format.Line: .ForeColor.RGB = RGB(255, 0, 0): .Weight = 4: End With: Next ser: Application.ScreenUpdating = True: End Sub
Close or minimize the Visual Basic Editor, return to Excel, press Alt+F8, select FormatSeries, and click Run while the target chart is selected.
Format chart series manually through the Format Data Series pane
Use this option for a small number of series or when macros are blocked by workbook security settings.
Apply consistent chart formatting with a lightweight Excel alternative
WPS Office is a free, lightweight Microsoft Office alternative with a familiar spreadsheet interface and strong Excel workbook compatibility. Open an XLSX file, edit the chart, and migrate your existing spreadsheet workflow without changing the file format.
- 1. Install WPS Office: Download and open WPS Office, then launch WPS Spreadsheets from the home screen.
- 2. Open the workbook: Choose Open, select the Excel .xlsx workbook, and click the chart you want to edit.
- 3. Adjust chart formatting: Use the chart formatting and series controls to update line colors, widths, and other visual settings, then save the workbook as XLSX.

Frequently Asked Questions
Can Excel format all chart series without selecting them one by one?
Yes. On desktop Excel, select the chart and run a VBA macro that loops through ActiveChart.SeriesCollection and changes each series line format.
Where do I paste the VBA code for chart formatting?
Press Alt+F11, choose Insert > Module in the Visual Basic Editor, paste the macro into the module, and run it from Excel with Alt+F8.
How do I change the macro's line color?
Replace the RGB values in .ForeColor.RGB = RGB(255, 0, 0) with the red, green, and blue values for your preferred color.
What does the .Weight value control in an Excel chart macro?
The .Weight property controls the line thickness. For example, .Weight = 4 applies a thicker line; use a smaller value for a thinner line.
Why does the macro not run in Excel?
The workbook must allow macros, and it should be saved as .xlsm. Also make sure the chart is selected before running the macro and that you are using desktop Excel rather than Excel for the web.




