Yes, you can create a bar graph with two variables in Excel, and the easiest way is to use a clustered column chart. This chart type places bars for each variable side-by-side for every category, making comparisons straightforward. You don't need any add-ins or advanced skills—just your data organized in a simple table and a few clicks. Below, I'll walk you through the exact steps, common pitfalls, and fixes.
What You'll Need
- Microsoft Excel (2016, 2019, 2021, or Microsoft 365; the steps are similar in older versions but menu labels may differ slightly).
- Your data in a rectangular range: one column for categories (e.g., months, product names, regions) and two or more columns for the numeric variables you want to compare.
- No blank rows or columns within the data range—Excel may misinterpret them as separate series.
Step-by-Step
- Prepare your data table. Put your category labels in the first column (e.g., A1:A6 for six months). Put the first variable's numbers in the second column (B1:B6) and the second variable's numbers in the third column (C1:C6). Include a header row in row 1 (e.g., "Month", "Sales", "Expenses")—Excel uses these headers for the legend and axis labels.
- Select the entire data range. Click and drag from the top-left cell (A1) to the bottom-right cell (C6). Make sure you include the headers but not any totals or extra text.
- Insert the chart. Go to the Insert tab on the Excel ribbon. In the Charts group, click the column chart icon (it looks like a small vertical bar chart). From the dropdown, choose the first option under 2-D Column—usually labeled Clustered Column. This is the default bar graph with two variables.
- Check the chart preview. Excel will place the chart on your sheet. You should see two sets of bars side-by-side for each category. If you only see one set of bars, your data wasn't selected correctly—see the Troubleshooting section below.
- Switch rows and columns if needed. If your variables are in rows instead of columns (e.g., each variable is a row, and categories are columns), click the chart, then go to the Chart Design tab (appears when the chart is selected) and click Switch Row/Column. This flips which data is on the x-axis and which is in the legend.
- Add a chart title. Click on the chart title placeholder (usually says "Chart Title") and type a descriptive title like "Monthly Sales vs. Expenses". To format the text, select it and use the font options on the Home tab.
- Label your axes. Click the chart, then click the + button (Chart Elements) on the top-right corner of the chart. Check Axis Titles. Type a title for the horizontal axis (e.g., "Month") and the vertical axis (e.g., "Amount in USD"). You can also format these titles by right-clicking them.
- Customize colors and style. Click on any bar in one series to select that entire series. Right-click and choose Format Data Series to change the fill color, border, gap width, or add data labels. To change the chart style, use the brush icon (Chart Styles) on the right side of the chart.
- Move or resize the chart. Click and drag the chart to reposition it on the sheet. Drag the corner handles to resize. To move it to a separate chart sheet, right-click the chart and choose Move Chart, then select New sheet.
- Update the data. If you change numbers in your source cells, the chart updates automatically. To add a new category, extend the data range by selecting the chart, going to Chart Design > Select Data, and adjusting the range. Alternatively, just add the new row to your table and drag the blue outline that appears around the data when the chart is selected.
Common Mistakes
- Selecting extra blank cells. If you include blank columns or rows in the selection, Excel may create empty series or treat blanks as zeros, resulting in gaps or extra legend entries.
- Using a line chart instead of a bar chart. If you pick the line chart icon, you'll get lines, not bars. Make sure you choose the column chart type.
- Putting both variables in one column. If you stack the two variables in a single column (e.g., all sales numbers then all expense numbers), Excel will treat them as one series. Keep them in separate columns.
- Not using headers. Without headers, Excel uses generic labels like "Series1" and "Series2" in the legend, and the first row of data becomes the category labels—which is wrong.
- Forgetting to switch rows/columns when data is transposed. If your data has categories in the first row and variables in the first column, you must use Switch Row/Column to get the correct grouping.
Tips
- Use a stacked column chart when you want to show part-to-whole relationships. If your two variables are components of a total (e.g., product A and product B sales making up total sales), a stacked column chart (the second option in the dropdown) might be more informative. But for direct comparison, clustered is best.
- Add data labels for precision. Right-click a series, choose Add Data Labels, and the exact values appear on each bar. This is helpful when the axis scale makes it hard to read exact numbers.
- Sort categories logically. Excel plots categories in the order they appear in your data. If your categories are months, sort them chronologically (Jan, Feb, Mar) rather than alphabetically (Apr, Feb, Jan) to make the trend clear.
- Keep the chart simple. Avoid too many colors or 3-D effects—they can distort the visual comparison. Stick to two distinct colors, one for each variable.
- Use a table for dynamic ranges. If you convert your data range to an Excel Table (Ctrl+T), the chart will automatically include new rows you add. This is a huge time-saver for ongoing data.
Troubleshooting
- Only one set of bars appears. This usually means Excel didn't recognize the second variable. Check that your data has two separate numeric columns. If you selected only one column, re-select the full range. Also, ensure there are no blank columns between your variables—Excel may stop reading at a blank column.
- The chart shows categories on the vertical axis and numbers on the horizontal. This happens when your data is transposed. Click the chart, go to Chart Design > Switch Row/Column. If that doesn't fix it, you may need to reorganize your data so categories are in the first column.
- Legend shows "Series1" and "Series2" instead of your variable names. This means your data didn't include headers. Right-click the chart, choose Select Data, and in the dialog, click Edit under Legend Entries (Series) and set the series name to the correct header cell. Or, re-select the data including the header row.
- Bars are not grouped side-by-side but stacked on top of each other. You may have accidentally chosen a stacked column chart. Click the chart, go to Chart Design > Change Chart Type, and select Clustered Column.
- Chart doesn't update when I change data. If the chart is not updating, check that the data range is correct. Right-click the chart, choose Select Data, and verify the range includes all your cells. If you added rows outside the original range, extend the range manually.
- Numbers on the axis are too small or too large. Right-click the vertical axis, choose Format Axis, and adjust the Bounds (minimum and maximum) or the Units (major unit). For example, if your values are in the thousands, set the major unit to 1000 or 5000 for cleaner labels.
Frequently Asked Questions
Can I create a bar graph with more than two variables?
Yes, the same steps work for any number of numeric columns. Just include all columns in your selection, and Excel will create a clustered bar chart with one series per column.
What's the difference between a bar chart and a column chart in Excel?
In Excel, a bar chart has horizontal bars, while a column chart has vertical bars. The steps above create a column chart (vertical bars). To get horizontal bars, choose the Bar chart type from the Insert tab instead of Column—the process is identical otherwise.
How do I add error bars to my bar graph?
Click the chart, then click the + button (Chart Elements), and check Error Bars. You can then right-click the error bars to format them, choosing the type (e.g., standard error, percentage) and amount.
Can I combine a bar graph with a line graph for the same data?
Yes. Create a clustered column chart, then right-click one series, choose Change Series Chart Type, and select a line chart type for that series. This creates a combo chart, which is useful when you have two variables with different units or scales.
Why does my chart show a blank category?
If your data range includes empty cells in the category column, Excel will plot a blank space. Remove the empty row or fill it with a label. Also, check for leading/trailing spaces in your category names—they can create duplicate-looking categories.
How do I make the bars wider or narrower?
Right-click any bar in a series, choose Format Data Series, and adjust the Gap Width slider. A lower gap width (e.g., 50%) makes bars wider; a higher value (e.g., 300%) makes them narrower.