How to Create an Excel Chart with 2 Variables
Putting two different sets of data on one Excel chart is one of the best ways to spot relationships you might have otherwise missed. This guide shows you exactly how to create an Excel chart with two variables, covering the best chart types for the job and walking you through the process step-by-step.
First, Which Chart Type Should You Use?
Before you build your chart, you need to decide what kind of story you want your data to tell. Different charts are built for different purposes. When working with two variables, your goal is typically to show a comparison, a relationship, or a trend over time.
Here are the three most common and useful charts for visualizing two variables in Excel:
- Scatter Plot (or XY Chart): Perfect for showing the relationship or correlation between two different numerical variables. Use this when you want to see if one variable's movement is related to another’s. For example, plotting ad spend against website visits to see if more spending leads to more traffic.
- Line Chart: The best choice for showing how a single variable changes over a period of time. Here, time (days, months, years) is your second variable on the horizontal X-axis. For example, tracking your monthly sales revenue over the last year.
- Column or Bar Chart: Ideal for comparing a numerical variable across different categories. Your first variable is the numerical value, and the second is the category name. For example, comparing the number of leads generated from different marketing channels (Google Ads, Facebook, SEO).
We'll walk through how to create each one of these. Don't worry - the process is very similar for all of them.
Preparing Your Data for Charting
No matter which chart you choose, the first step is always getting your data organized properly in Excel. This is the single most important part of the process. A well-structured table will make creating your chart effortless.
Your data should be arranged in two columns, side by side. Each row should represent a single data point connecting your two variables. For instance, if you're comparing ad spend to sales, each row should contain the ad spend for a specific day or week and the corresponding sales for that same period.
Here’s a good rule of thumb:
- Place your independent variable in the left column. This is the variable you control or that represents categories or time (e.g., Month, Ad Spend, Marketing Channel). This data will appear on the horizontal axis (X-axis).
- Place your dependent variable in the right column. This is the metric that you observe or measure, which you think might be a "result" of the first variable (e.g., Sales, Website Visitors, Number of Leads). This data will appear on the vertical axis (Y-axis).
Having clear headers at the top of each column will also help Excel understand your data and automatically label your chart.
How to Create a Scatter Plot to See Relationships
Let's say you want to find out if there's a connection between your daily Facebook Ads spend and the number of sales you get. A scatter plot is the perfect tool for this analysis.
Step 1: Set Up Your Data Table
Start by creating a simple table with your two variables. Put "Ad Spend ($)" in column A and "Daily Sales" in column B.
Step 2: Select Your Data
Click and drag your mouse to highlight the entire dataset, including the headers. In our example, you would select cells A1 through B9.
Step 3: Insert the Chart
With your data selected, navigate to the Insert tab on Excel's top ribbon. In the Charts section, look for the icon that looks like a plot with several dots. This is the Scatter chart menu.
Click on it, and select the first option, which is a simple Scatter chart. Excel will instantly create the chart and place it on your worksheet.
Step 4: Customize and Refine Your Chart
Now you have a basic chart, but it needs a few finishing touches to be easily understood by others (and your future self).
- Add a Chart Title: Double-click the default "Chart Title" and give it a descriptive name, like "Relationship Between Ad Spend and Daily Sales."
- Label the Axes: Click on the chart, then click the green "+" sign that appears on the right. Check the box for "Axis Titles." Double-click on the new text boxes to label the horizontal axis "Ad Spend ($)" and the vertical axis "Daily Sales."
- Add a Trendline (Optional but useful!): Click the "+" sign again, check the box for "Trendline." Excel will automatically draw a line of best fit through your data points, making the relationship clearer. A positive slope indicates a positive correlation.
How to Create a Line Chart to Track Trends
Now, let's imagine you want to visualize how your website traffic has changed over the first half of the year. A line chart is perfect for showing this trend over time.
Step 1: Organize Your Data Chronologically
In column A, list the "Month," and in column B, list the corresponding "Website Visitors." Make sure your months are in order.
Step 2: Select the Data and Insert the Line Chart
Highlight all the cells containing your data (A1 to B7). Go to the Insert tab, click the icon showing a line graph, and select the first 2-D Line option.
Step 3: Make Your Line Chart Easy to Read
- Title and Axis Labels: Name the chart "Website Visitor Trend - First Half of Year" and label the y-axis "Number of Visitors." Excel should automatically label the x-axis "Month."
- Add Data Markers: Click the "+" icon, hover over "Data Labels," and select a position like "Above" to display the exact visitor number over each point.
- Adjust the Design: Use the "Chart Design" tab to select different styles and colors to improve visual appeal.
How to Create a Column Chart to Compare Categories
Finally, let's say your manager wants to know which marketing channel brought in the most leads last quarter. A column chart is the classic choice for this kind of categorical comparison.
Step 1: Set Up Your Categorical Data
List categories in column A and their corresponding values in column B:
Step 2: Select and Insert the Column Chart
Highlight cells A1 through B6. Go to the Insert tab, find the Column or Bar Chart icon, and select "2-D Clustered Column."
Step 3: Enhance Your Column Chart
- Title: Name it "Leads Generated by Channel - Q3."
- Adjust Bar Colors: Click on a bar to select the series, then click a specific bar to format just that bar. Right-click, choose "Format Data Point," and change the fill color. For example, make the SEO bar bright green.
Advanced Tip: Creating a Combo Chart for Variables With Different Scales
What if your two variables are measured on different scales? For example, plot "Number of Products Sold" (hundreds) against "Total Revenue" (thousands of dollars). Placing these on a normal chart will make one set barely visible.
The solution is a Combination Chart with a second Y-axis.
Step 1: Set Up a Three-Column Table
Step 2: Insert a Clustered Column Chart to Start
Select all three columns and insert a standard "Clustered Column" chart. You’ll see bars for units sold and revenue—likely with revenue bars towering over units sold.
Step 3: Change a Series to Use the Secondary Axis
Right-click on the "Units Sold" series, choose Format Data Series..., and select Secondary Axis. A new axis will appear on the right, scaled for units sold.
Step 4: Change the Chart Type to a Combo
Right-click the "Units Sold" series again, select Change Series Chart Type..., and in the dialog, set "Units Sold" to a line chart (or line with markers), and keep "Revenue" as clustered columns. Ensure "Secondary Axis" is checked for units sold. Click OK.
Now, your chart shows both revenue and units sold on different scales, clearly visualized together.
Final Thoughts
Creating charts with two variables in Excel is a fundamental skill. By choosing the right chart—Scatter Plot for relationships, Line Chart for trends, or a Combo Chart for different scales—you can turn confusing spreadsheets into clear, actionable insights.
At our company, we spent years building these reports manually in Excel and Google Sheets, pulling data from sources like Google Analytics, Shopify, and our ad platforms. We found that much of our week was spent on exporting CSVs and updating charts instead of focusing on strategy. That’s why we built Graphed, to connect all our data sources into one place and create live, auto-updating dashboards easily. This transforms hours of manual work into a 30-second task.
Related Articles
How to Enable Data Analysis in Excel
Enable Excel's hidden data analysis tools with our step-by-step guide. Uncover trends, make forecasts, and turn raw numbers into actionable insights today!
What SEO Tools Work with Google Analytics?
Discover which SEO tools integrate seamlessly with Google Analytics to provide a comprehensive view of your site's performance. Optimize your SEO strategy now!
Looker Studio vs Metabase: Which BI Tool Actually Fits Your Team?
Looker Studio and Metabase both help you turn raw data into dashboards, but they take completely different approaches. This guide breaks down where each tool fits, what they are good at, and which one matches your actual workflow.