Sub topic 3
Formatting and Styling an Excel Chart
Assume you can select worksheet ranges and use the Excel ribbon. A chart’s formatting should clarify the data, not decorate it.
Formatting and styling a chart
Select the chart and use Chart Design to choose a style, color set, and layout. Use Format to change fills, borders, fonts, and spacing. Add only useful elements: a descriptive title, labeled axes, a legend when there are multiple series, and data labels when exact values matter.
Changing what a chart plots with Select Data
Right-click the chart and choose Select Data. Use Legend Entries (Series) to add, remove, or edit series. Use Horizontal (Category) Axis Labels to change category labels. If Excel plotted rows instead of columns, choose Switch Row/Column.
Choosing the right chart for your question
| Question | Suitable chart |
|---|---|
| Compare separate groups | Column or bar |
| Show change over time | Line |
| Show parts of one whole | Pie |
Use a bar chart when category names are long. Avoid pie charts with many slices or very similar values.
Combining column and line series with a secondary axis
A combination chart compares different measures, such as sales and profit rate. Choose Insert > Combo, assign one series to a line, and select Secondary Axis when the scales differ greatly. Label both axes so readers understand the units.
Charts that grow with your data using Tables
Select the source range and press Ctrl+T to create an Excel Table. Build the chart from the table. New rows are then included automatically as the table expands.
Alt text, copying, and exporting charts
Right-click a chart and choose View Alt Text. Describe the chart’s purpose, categories, and main result. Copy a chart as an image for a fixed report, or export the workbook as PDF when the chart must remain with its worksheet context.
Creating charts with VBA
This macro creates a chart from cells A1:B5:
Sub CreateColumnChart()
Dim co As ChartObject
Set co = ActiveSheet.ChartObjects.Add(100, 50, 400, 250)
With co.Chart
.SetSourceData ActiveSheet.Range("A1:B5")
.ChartType = xlColumnClustered
.HasTitle = True
.ChartTitle.Text = "Sales by Region"
End With
End SubExercise
Which chart should show monthly revenue and profit margin when their scales differ?
Show answer
Use a combination chart with columns for revenue, a line for profit margin, and a secondary axis for the margin.