Bar Chart in Cell Excel: How to Make One

Charts & pivot tables · Updated November 3, 2026

Bar Chart in Cell Excel: How to Make One

Excel does not put a standard bar chart inside a worksheet cell, but you can create an in-cell bar effect with Conditional Formatting > Data Bars. Select the cells containing numbers, choose Home > Conditional Formatting > Data Bars, and pick a style; Excel then draws a bar in each cell to represent its value. For a miniature chart with axes or multiple plotted values, use a Sparkline or a regular chart instead.

What “bar chart in a cell” means in Excel

The phrase can describe a few different things, and choosing the right feature saves time. Most people want to see a horizontal bar alongside a number in a table, such as a bar showing each salesperson’s revenue or each project’s completion amount. Excel’s Data Bars conditional-formatting feature is designed for that purpose. The bar is drawn in the cell’s background area, with its length based on the cell’s value relative to other values in the selected range.

A Data Bar is not a miniature version of a full chart. It has no category axis, title, legend, or independent data series. It is a visual cue attached to a cell’s value. Excel’s Sparklines are also compact graphics placed in cells, but the built-in Sparkline types are Line, Column, and Win/Loss. A Column Sparkline can look like a tiny vertical bar chart, while a Data Bar usually looks like a horizontal progress bar.

That distinction matters when you need to compare values quickly. Data Bars work well in a compact report table; a full chart is better when readers need labels, a scale, multiple series, or a clear explanation of what is being compared.

How to add Data Bars to cells

For a basic in-cell bar, first arrange the values in a single range. For example, put employee names in A2:A6 and sales amounts in B2:B6. Select B2:B6, then use these Windows steps in Excel for Microsoft 365:

  1. Open the Home tab.
  2. Choose Conditional Formatting > Data Bars.
  3. Select a preset under Gradient Fill or Solid Fill. Excel applies a bar to each selected value.

The numbers remain in the cells by default, with the bars displayed behind them. In this example, each sales amount gets a bar whose length helps compare it with the other amounts in B2:B6. The format is conditional formatting, not an inserted chart, so you do not need to create a separate chart object or assign it a position on the worksheet.

For a custom rule, select the range and choose Home > Conditional Formatting > New Rule. In the New Formatting Rule dialog, choose Format all cells based on their values, then select Data Bar as the format style. This route is useful when you want to set a specific minimum or maximum, choose a particular fill, or hide the displayed number. You can revisit an existing rule through Home > Conditional Formatting > Manage Rules, select the rule, and choose Edit Rule.

Choose the scale, color, and displayed value

By default, Excel determines the bar scale from values in the formatted range. The smallest value generally receives the shortest bar and the largest receives the longest. If your range changes, the bars can change length even when an individual cell’s value does not, because its value is being compared with the current minimum and maximum. This makes the feature useful for relative comparisons, but it can make comparisons between separate tables misleading if each table uses its own scale.

In the rule settings, you can set the minimum and maximum to particular values rather than relying on automatic bounds. A shared scale is helpful when two groups need to be compared fairly. For example, if monthly completion values are percentages from 0% to 100%, setting a consistent maximum of 100% gives the bars the same reference point across reports. If the bars should simply rank values within one changing list, automatic bounds may be more appropriate.

Choose a fill color that contrasts with the worksheet background and remains legible behind the number. You can use a gradient or solid fill from the Data Bars presets, or select a custom color while editing the rule. The Show Bar Only option in the rule settings hides the number visually while retaining its underlying cell value. Use it when the bar itself is the intended display, but keep the number visible when readers need exact figures. A useful compromise is to show the number and bar together.

Practical examples and when Data Bars help

Data Bars are most useful when values already sit in a table and a reader needs to scan for relative size without leaving that table. Examples include revenue by product, hours logged by team, inventory on hand, or the number of tasks completed in each project. With values in one column, the bars create a quick visual ranking while keeping row labels and exact values close at hand.

They can also show progress, but take care with the scale. If a task is 35% complete, a bar can communicate progress toward 100% only when the rule’s maximum is set to 100%. If Excel instead scales the bar to the largest current value, a 35% task could appear nearly full when every other task is at 20% or below. For a true progress indicator, define a meaningful fixed maximum and make the percentage value clear to readers.

Use a Data Bar only when the numbers are comparable. Adding bars to dates, identifiers, or unrelated figures can suggest a ranking that does not mean anything. For example, a bar beside an invoice number is not informative just because invoice numbers are numeric. The graphic should reinforce the meaning of the measure, not merely decorate the cell.

Data Bars compared with Sparklines and charts

Choose Data Bars for a one-value-per-cell comparison. Choose a Sparkline when each row contains a sequence and you want to show its pattern in one cell. To add one in Microsoft 365 for Windows, select the destination cell or cells, choose Insert > Sparklines > Column, specify the Data Range and Location Range in the dialog, and select OK. For instance, a row of monthly sales figures can feed a Column Sparkline in the last column, showing the ups and downs over time. A Sparkline is still compact and has fewer chart controls than a regular chart.

Use a standard chart when the reader needs more context or more control. Select the source data and choose Insert > Insert Column or Bar Chart to create a chart object. A bar chart is typically horizontal, while a column chart is vertical. The chart can have axes, titles, labels, a legend, and multiple series. It is not truly contained in a cell: it sits over the worksheet grid and can be moved or resized. In the chart’s size and properties settings, Excel can make it move and size with the cells beneath it, but that does not turn it into an in-cell chart.

In short, the best choice depends on the information: Data Bars compare individual values, Sparklines show a compact trend for a sequence, and standard charts provide fuller presentation and analysis.

Common problems and how to fix them

  • Every bar looks almost the same. Check whether the values are actually close together, and inspect the rule’s minimum and maximum. A fixed scale can make small differences less prominent; an automatic scale can emphasize them.
  • Bars look too long or too short. The rule may be comparing the cells with an unexpected range. Open Home > Conditional Formatting > Manage Rules and check the range shown for the rule. Edit or recreate the rule for the intended cells.
  • The number has disappeared. Edit the Data Bar rule and clear Show Bar Only if you want the value displayed as well. The underlying value is not deleted when this option is selected.
  • Negative numbers look different. Data Bars can represent values on both sides of zero, so Excel may show a dividing axis and bars extending in different directions. Review the rule’s negative-value and axis settings if the direction or color needs adjustment.
  • Formatting appears on the wrong rows. Check the rule’s Applies to range in Manage Rules. If there are overlapping conditional-formatting rules, review their order and settings; another rule may affect the same cells.

Also confirm that the cells contain numeric values rather than numbers stored as text. A text entry such as a number preceded by an apostrophe will not behave like a normal numeric measure for a Data Bar rule. If a value should be numeric, convert it to a number before evaluating the formatting.

Excel on Mac and Excel for the web

In Excel for Microsoft 365 on Mac, Data Bars are available through the Home tab’s Conditional Formatting menu, though the dialog layout and exact controls can differ from Windows. Look for the Data Bars presets to apply a rule, and use the conditional-formatting rule controls to adjust it. Windows-specific keyboard shortcuts and dialog instructions should not be assumed to match Mac; menu navigation is the clearest way to follow these steps on either desktop platform.

Excel for the web also supports conditional formatting, but the available editing controls can differ from the desktop application. If a rule needs detailed adjustments, such as a specific scale or axis behavior, open the workbook in the desktop version and review it there. When sharing the workbook, check that the bars remain understandable at the zoom level and screen size readers are likely to use.

Frequently Asked Questions

Can I put a real bar chart inside one Excel cell?
Not as a standard Excel chart. Use Conditional Formatting > Data Bars for a bar drawn in a cell, a Column Sparkline for a tiny vertical chart, or a normal chart object for a full chart.

Can I show the number and the bar together?
Yes. That is the default appearance for Data Bars. If the number is hidden, edit the rule and turn off Show Bar Only.

Can I make every bar use the same maximum?
Yes. Edit the Data Bar rule and set a fixed maximum in place of the automatic maximum. A shared maximum is especially useful for progress values or for comparing separate groups.

Do Data Bars change the values in my cells?
No. They are a visual conditional format. The original numbers remain in the cells and continue to be available for calculations and other worksheet features.

Can I use Data Bars for negative numbers?
Yes. Excel can display positive and negative bars relative to zero. If the result is hard to interpret, edit the rule’s negative-value and axis settings or choose a regular chart with a clearly labeled scale.

Why does a bar change when I add another value?
With automatic bounds, Excel compares values across the rule’s range. Adding a new minimum or maximum can change the relative lengths. Set fixed bounds if the scale must stay consistent as the data grows.

Related

Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.

More in Charts & pivot tables

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.