Chart & Visualization Issues

Excel: Format All Chart Series at Once

Huda QurayshiHuda Qurayshi Nov 12, 2026 870 views

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.
Before you start

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.

Solution 1Recommended

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.

1
Open the VBA editor

In desktop Excel, select the chart, press Alt+F11, choose Insert > Module, and create a standard VBA module.

2
Add the formatting macro

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

3
Run the macro

Close or minimize the Visual Basic Editor, return to Excel, press Alt+F8, select FormatSeries, and click Run while the target chart is selected.

Customize the style: Change RGB(255, 0, 0) to the required RGB color and change .Weight = 4 to another line weight as needed.
Free Microsoft Office alternative

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. 1. Install WPS Office: Download and open WPS Office, then launch WPS Spreadsheets from the home screen.
  2. 2. Open the workbook: Choose Open, select the Excel .xlsx workbook, and click the chart you want to edit.
  3. 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.
Open and edit Microsoft Excel XLSX workbooks with familiar spreadsheet tools.Use a lightweight interface for reviewing and adjusting chart data and appearance.Keep common Microsoft Office formats, including XLSX, compatible during migration.Reduce the need for repetitive chart editing with clear formatting controls.
microsoft office alternative - wps office

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.