How to Create an Excel Chart from Two Tables
In this article
To create an Excel chart from two tables, you combine data from separate ranges into a single chart series, allowing you to visualize relationships between different datasets—like sales by region versus customer demographics, or inventory levels versus shipment dates. This is useful when your data is logically split across tables but needs to be compared visually. Before starting, ensure both tables are properly formatted as Excel Tables (using Ctrl+T) and share at least one common dimension, such as dates or categories, so they can be aligned in the chart.
What You'll Need
- Microsoft Excel 2010 or later (Windows or Mac)
- Two clearly defined data tables with headers
- At least one matching column between the tables (e.g., Month, Product ID, Region)
- Basic familiarity with selecting ranges and inserting charts
Step-by-Step
- Open your Excel workbook and locate both data tables. Ensure each table has headers in the first row and no blank rows or columns within the data range. If data is unformatted, select the entire range and press Ctrl+T to convert it into a structured table.
- Identify the common field between the two tables—for example, if Table1 has columns: Date, Sales, and Table2 has Date, Expenses, then Date is your alignment key. This will be the X-axis category in your chart.
- Click an empty cell outside both tables where you want to build your chart. Go to the Insert tab on the ribbon, then click Recommended Charts. If you don’t see a suitable option, choose All Charts and select Combo.
- In the Combo chart dialog, select Clustered Column - Line on Secondary Axis. This lets you plot one dataset as bars and another as a line, making comparisons intuitive. If you prefer both as lines or both as columns, choose the appropriate combo type.
- Click the Switch Row/Column button if your data appears sideways. Then, click the Edit button under Chart Data Range.
- In the Chart Data Range window, manually type or select the range for the first series. For example, if Table1 is A1:B10, select A1:B10. Press Enter. Then click Add to create a second series.
- For the second series, select the range from Table2 that matches the common dimension. If Table2 is D1:E10, select D1:E10. Ensure the first column of each table (the common field) is included in both selections.
- After adding both ranges, Excel will prompt you to confirm which column contains the category labels. Select the column from Table1 (e.g., Date) as the primary axis label source. This ensures all points align correctly on the horizontal axis.
- Click OK to close the data range window. Your chart will now display both datasets. If one series appears too small, right-click the line or column and choose Format Data Series > Secondary Axis to move it to the right-hand scale.
- Customize the chart: Click the Chart Elements button (the plus icon) and check Axis Titles, Data Labels, and Legend. Rename axis titles to reflect what each series represents (e.g., "Sales ($)", "Expenses ($)").
- Ensure both tables are still linked. If you update data in either table, the chart updates automatically. If it doesn’t, right-click the chart and select Refresh Data.
Common Mistakes
- Selecting non-aligned data ranges—e.g., using Table1’s Date column and Table2’s Product ID as categories—causes mismatched or missing points on the chart.
- Forgetting to include the common field in both data selections, resulting in Excel treating the two tables as unrelated series with no meaningful X-axis.
- Using unstructured ranges (e.g., A1:D20 with empty cells) instead of Excel Tables, which breaks auto-expansion and causes chart updates to fail when new data is added.
- Placing the two tables on different sheets without ensuring consistent naming of headers, leading to confusion when selecting data ranges.
- Trying to use pivot charts or pivot tables as a shortcut when the source data isn’t consolidated first; pivot charts require a single source table.
Tips
- Use named ranges for complex datasets: Go to Formulas > Define Name and assign a name like "SalesData" to Table1’s range. Then reference "SalesData" in the chart data source instead of A1:B10.
- Color-code your series: Right-click each chart element and choose Format Data Series to assign distinct, high-contrast colors that improve readability.
- Use a secondary axis when the value scales differ greatly—for example, if one dataset ranges from 0–100 and another from 0–10,000. This prevents one series from appearing flat.
- Keep table headers consistent: If one table uses "Month" and the other "Month Name", Excel may not recognize them as matching. Standardize names before charting.
- Test with dummy data first: Insert a few sample rows in both tables to verify alignment before using real, sensitive data.
- Save a backup copy before making structural changes. Excel’s automatic chart updates can sometimes misalign series if table structure is modified.
Troubleshooting
- If the chart shows #REF! errors, one of your data ranges may have been deleted or moved. Right-click the chart > Select Data, then reselect the correct ranges.
- If categories are missing or appear duplicated, check that the common column (e.g., Date) contains identical values in both tables. Extra spaces, different date formats (e.g., 1/1/2024 vs. 01-Jan-2024), or text vs. number formatting will break alignment. Use the TRIM and VALUE functions to clean data.
- If the chart doesn’t update when you add rows to a table, ensure the table was created using Ctrl+T and that new rows were added within the table boundaries—not below it.
- If two series overlap and are unreadable, change one to a line chart and move it to the secondary axis. Right-click the series > Change Series Chart Type > Line.
- If Excel refuses to accept two separate tables as data sources, try copying one table’s data into the other table’s sheet and combining them into a single range before charting. This is less dynamic but more reliable.
- Restart Excel if the chart behaves erratically. Corrupted chart objects sometimes fix after a restart.