how to create chart with 2 y axis

How to Create a Chart with Dual Y-Axis in Excel & Google Sheets

By Daniel Lee
AD

Creating a chart with two y-axes can be a powerful way to compare different sets of data that don't share the same scale. This is especially useful when you want to examine two distinct datasets together, allowing for a more comprehensive understanding of your data. In this guide, we'll walk you through the steps to create a chart with two y-axes using Microsoft Excel and Google Sheets, two popular spreadsheet software used worldwide.

Before we dive into the step-by-step process, it's essential to understand that the process varies slightly between Microsoft Excel and Google Sheets. However, the underlying principle remains the same: to create a secondary y-axis, you'll need to move one of your datasets to a new axis. Let's start with Excel.

Creating a Chart with Two Y-Axes in Microsoft Excel

To create a chart with two y-axes in Excel, you'll need to have your data ready in a table format. Let's assume you have data in columns A (Category), B (Dataset 1), and C (Dataset 2).

AD
Free Graph Paper To Print With X And Y Axis | Printable Graph Paper
Free Graph Paper To Print With X And Y Axis | Printable Graph Paper
Excel: How to create a dual axis chart with overlapping bars and a line
Excel: How to create a dual axis chart with overlapping bars and a line
Pareto Chart
Pareto Chart

Now, let's create the chart:

Step 1: Select Your Data

Highlight the data you want to plot, ensuring that the category (A) data is on the x-axis. To plot both datasets, you'll need to move Dataset 2 (C) to a new series, which will create a second y-axis.

the graphing function is shown with two lines that are parallel to each other, and one
the graphing function is shown with two lines that are parallel to each other, and one
The Ultimate Guide to Customizing the Vertical Axis in Excel Charts
The Ultimate Guide to Customizing the Vertical Axis in Excel Charts
How to Add a Secondary Axis in an Excel Pivot Chart (with Easy Steps) - ExcelDemy
How to Add a Secondary Axis in an Excel Pivot Chart (with Easy Steps) - ExcelDemy

To select both datasets, click on cell B1 (Dataset 1) and drag your cursor down to the last cell of Dataset 2 (Cn), then press and hold Ctrl while clicking and dragging from B1 to Cn to select both datasets.

Step 2: Insert a Scatter with Smooth Lines and Markers Chart

On the 'Insert' tab, in the 'Charts' group, click on 'Scatter' and then 'Scatter with Smooth Lines and Markers'. Choose the scatter chart icon ( lookup for 'Scatter with Smooth Lines and Markers and Markers'). Your chart will appear with one series (Dataset 1).

AD

Now, let's add the second series (Dataset 2) and move it to the secondary y-axis:

How to Switch X and Y Axis in Excel
How to Switch X and Y Axis in Excel
Microsoft Copilot Blog | Latest Product Updates and Insights
Microsoft Copilot Blog | Latest Product Updates and Insights
How to Plot Graph in Excel with Multiple Y Axis (3 Handy Ways) - ExcelDemy
How to Plot Graph in Excel with Multiple Y Axis (3 Handy Ways) - ExcelDemy
How to Add Axis Titles to Charts in Excel
How to Add Axis Titles to Charts in Excel
How to Create Charts and Graphs in Excel
How to Create Charts and Graphs in Excel
How to Create an XY Chart With a Centered Axis in Word | Techwalla
How to Create an XY Chart With a Centered Axis in Word | Techwalla

Step 3: Add the Second Series and Move It to the Secondary Axis

Click on the chart, then right-click and select 'Select Data'. In the 'Select Data Source' dialog box, under 'Legend Entries (Series)', click 'Add'. In the 'Edit Series' dialog box, type a name for the second series (e.g., 'Series 2'), select the range for the second series of y-values (Cell range $C$2 to $C$n), and then click 'OK'.

Now, click on the chart again. Notice that 'Series 2' is plotted on the same axis as 'Series 1'. To move it to the secondary axis, right-click on one of the data series in the chart and select 'Format Selection'. In the 'Format Selection' pane, expand 'Series 'Series 1', Series 2'' (depending on your series names) and click on 'Axis'. Check 'Secondary axis', and click anywhere outside the 'Format Selection' pane to close it. Your chart will now display with two y-axes.

AD

Creating a Chart with Two Y-Axes in Google Sheets

Creating a chart with two y-axes in Google Sheets follows a similar process as in Excel, with a few variations:

How to Add Secondary Axis in Excel Fast – Step by Step Guide
How to Add Secondary Axis in Excel Fast – Step by Step Guide
How to Change Y Axis Scale in Excel (with Easy Steps) - ExcelDemy
How to Change Y Axis Scale in Excel (with Easy Steps) - ExcelDemy
Secondary Axis in Excel: Add, Remove & Change - ExcelDemy
Secondary Axis in Excel: Add, Remove & Change - ExcelDemy

Suppose you have the same data format in columns A (Category), B (Dataset 1), and C (Dataset 2).

Step 1: Highlight Your Data

Select the data you want to plot, ensuring that the category (A) data is on the x-axis. To select both datasets, click on cell B1 (Dataset 1) and drag your cursor down to the last cell of Dataset 2 (Cn), then press and hold Ctrl while clicking and dragging from B1 to Cn to select both datasets.

AD

Now, let's create the chart:

Step 2: Insert a Scatter Chart

Click on 'Insert chart' in the toolbar. In the 'Chart Editor' panel on the right, choose the scatter chart icon ( lookup for 'Scatter'). Your chart will appear with one series (Dataset 1).

Next, let's add the second series and move it to the secondary y-axis:

Step 3: Add the Second Series and Move It to the Secondary Axis

Click on the 'Chart' tab in the menu and then click on 'Add (legend entry)'. In the 'Create new series' dialog box, type a name for the second series (e.g., 'Series 2'), select the range for the second series of y-values (Cell range $C$2 to $C$n), and then click 'OK'.

Now, click on the chart again. Notice that 'Series 2' is plotted on the same axis as 'Series 1'. To move it to the secondary axis, click on 'Customize' in the 'Chart Editor' panel, then click on 'Vertical axis' in the dropdown menu. Check 'Second y-axis', and click anywhere outside the 'Customize' section to close it. Your chart will now display with two y-axes.

Congratulations! You've successfully created a chart with two y-axes in both Microsoft Excel and Google Sheets. This valuable skill will allow you to compare diverse datasets and gain deeper insights into your data. Happy data analysis!

AD