How to Make a Line Graph in Excel with Multiple Variables

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.


Make a Line Graph in Excel with Multiple Variables: Step-by-Step

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

  • Now, select anywhere in the dataset. Then choose Insert >> Line or Area Chart >> 2-D Line >> Line from the Insert tab.

make a line graph in excel with multiple variables

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

Read More: How to Make Line Graph with 3 Variables in Excel


📌 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.

make a line graph in excel with multiple variables

  • 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 the Chart Elements icon and align the Legend to the right.

Read More: How to Edit a Line Graph in Excel


📌 Step 6: Finalize the Line Graph

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

make a line graph in excel with multiple variables


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.
  • Please make sure all rows and columns are selected before switching them.

Download Practice Workbook

You can download the practice workbook from the download button below.


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. Stay with us and keep learning.


Related Articles


<< Go Back To Line Graph in Excel | Excel ChartsLearn Excel

Get FREE Advanced Excel Exercises with Solutions!
Md. Shamim Reza
Md. Shamim Reza

Md. Shamim Reza, a marine engineer with expertise in Excel and a fervent interest in VBA programming, sees programming as a time-saving tool for data manipulation, file handling, and internet interaction. His diverse skill set encompasses Rhino3D, Maxsurf C++, AutoCAD, Deep Neural Networks, and Machine Learning. He holds a B.Sc in Naval Architecture & Marine Engineering from BUET and has transitioned into a content developer role, generating technical content focused on Excel and VBA. Beyond his professional pursuits,... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo