# How to Make a Line Graph in Excel with Multiple Variables

Get FREE Advanced Excel Exercises with Solutions!

This article illustrates how to make a line graph in excel with multiple variables. A line graph connects different data points to show the trend and make them easily understandable. You can make a line graph in excel to portray the change in multiple data variables in relation to a particular one. Follow the article to learn how to do that easily.

## Steps to Make a Line Graph in Excel with Multiple Variables

Follow the steps below to make a line graph in excel with multiple variables.

### 📌 Step 1: Organize Data

• Assume you have prepared the following dataset containing monthly product sales. The row headers represent the X-axis variables and the column headers represent the Y-axis variables.

### 📌 Step 2: Insert Line Graph

• After that, the Line Graph will be inserted as follows.

### 📌 Step 3: Switch Row/Column of the Graph

• If the Line Graph shows the columns as rows and rows as columns, you need to switch the rows in the line graph to columns and the columns to rows.
• Now, right-click on the line graph and choose Select Data to do that.

• Then, select Switch Row/Column and press OK.

• After that, the line graph will look as follows.

### 📌 Step 4: Add Secondary Axis to Line Graph

• Now you need to add a secondary axis for the Total sales to make the line graph more presentable.
• Now double-click on the line graph for the Total sales. Then the Format Data Series pane will appear on the right. You can also do that by right-clicking on the data series. Next, mark the radio button for the Secondary Axis.

• After that, the line graph will look as follows.

• Next, double-click on the secondary axis and change the Maximum value to adjust the data series properly.

### 📌 Step 5: Change Chart Title and Legends

• Now, click on the chart title to rename it as required.

• Then, click on the Chart Elements icon and align the Legend to the right.

### 📌 Step 6: Finalize the Line Graph

• Finally, apply some text and outline formatting. After that, you will get the following result.

## Things to Remember

• You must select anywhere in the dataset before inserting the Line Graph. Otherwise, you will need to add the rows and columns manually.
• Make sure all rows and columns are selected before switching them.

## Conclusion

Now you know how to make a line graph in excel with multiple variables. Do you have any further queries or suggestions? Please let us know using the comment section below. You can also visit our ExcelDemy blog to explore more about excel. Stay with us and keep learning.

## Related Articles

Md. Shamim Reza

Hello there! This is Md. Shamim Reza. Working as an Excel & VBA Content Developer at ExcelDemy. We try to find simple & easy solutions to the problems that Excel users face every day. Our goal is to gather knowledge, find innovative solutions through them and make those solutions available for everybody. Stay with us & keep learning.

We will be happy to hear your thoughts

Advanced Excel Exercises with Solutions PDF