Google Sheets does not currently offer Excel-style data bars as a built-in option under conditional formatting. To show a bar inside a cell, use the SPARKLINE function with a bar chart, or use conditional formatting to highlight cells with color instead.
Does Google Sheets have data-bar conditional formatting?
Not in the same way Microsoft Excel does. In Google Sheets, the conditional-formatting panel lets you apply a color to cells when they meet a condition, or use a color scale to shade cells according to their values. It does not provide a native rule that draws a proportional bar behind or alongside each value.
This difference matters if you are following Excel instructions. In Excel, data bars are a dedicated conditional-formatting style. In Sheets, opening Format > Conditional formatting will not reveal a data-bar option. Searching the available formatting styles or changing the rule type will not enable one. The practical alternative is to create a small bar chart within each cell using a formula, then format that cell to suit the table.
A SPARKLINE bar is not technically conditional formatting: it is a graphic generated by a spreadsheet function. It can still provide a compact, easy-to-scan comparison alongside values, but it has different setup and formatting behavior. Knowing that distinction helps avoid wasting time looking for a missing menu command.
What a data bar shows
A data bar turns a number into a visual length. For example, a sales table might show that one product sold 72 units and another sold 35; bars make the relative sizes easier to spot than a column of numbers alone. The number remains available for exact reading, while the bar offers a quick visual cue.
Bars are most useful when values share a meaningful scale. A value of 72 should not look nearly full in one row and short in another simply because each row uses a different maximum. Decide whether the bar should represent a fixed target, such as progress toward 100%, or the largest value in the current dataset. That choice affects how readers interpret every bar.
Bars are less informative when the values are unrelated, the scale changes without warning, or the numbers are already easy to compare. For a small table with only two or three entries, ordinary values or a color scale may be clearer. A bar should help people read the data, not decorate it at the cost of clarity.
Create in-cell bars with SPARKLINE
SPARKLINE creates a miniature chart inside a cell. For a bar, place the formula in a neighboring column and set a maximum so the bar has a consistent scale. For example, with scores in B2:B20, enter the formula below in C2 to display each score as a bar measured against 100:
=SPARKLINE(B2,{"charttype","bar";"max",100})
If B2 contains 72, the bar represents 72 out of 100; it will occupy roughly 72% of the available bar range. The exact visible length depends on the cell width and the chart rendering, so the bar is a visual comparison rather than a replacement for the numeric value. After entering the formula in C2, use the fill handle to copy it down the column. Each copied formula will refer to the corresponding value in column B.
- Put the source numbers in one column and leave the next column for the bars.
- Choose a scale that matches the data, such as 100 for scores out of 100 or a fixed monthly target for sales.
- Enter the SPARKLINE formula in the first bar cell and copy it down for the remaining rows.
- Widen the bar column enough to make differences visible, and align the numbers and bars consistently.
In Google Sheets, a SPARKLINE bar is contained in its own cell; it does not sit behind the number in the source cell like an Excel data bar may. Keeping the value and bar in adjacent columns is often the clearest layout. Add a concise heading such as “Score” and “Progress” so readers know which column contains the exact value and which contains the visual.
Choose a scale that makes comparisons fair
A fixed maximum is straightforward when the measure has a known limit. For example, scores out of 100 can use 100, and task completion percentages can use 100%. If a bar uses a maximum of 100 but the values are entered as decimal percentages from 0 to 1, the bars will appear tiny; match the maximum to the units actually stored in the cells.
For values that do not have a fixed target, you can use the largest value in the comparison range. With the values in B2:B20 and the bar formula being entered in C2, this version sets the maximum to the largest value in that range:
=SPARKLINE(B2,{"charttype","bar";"max",MAX($B$2:$B$20)})
The dollar signs keep the maximum range fixed when you fill the formula down, while the reference to B2 adjusts for each row. If the largest value is 80, a value of 40 will appear at about half the scale. This makes the bars useful for comparing the rows currently in that range, but it also means that adding a larger value can make all existing bars appear shorter. A changing maximum is not a flaw; it is simply a different comparison rule from a fixed target.
Think carefully about zero and negative values. A bar chart is easiest to interpret when the data are nonnegative and have a clear zero point. If values can be negative, or if the distinction between positive and negative matters, test the display with representative values and consider whether a standard chart or a separate positive/negative design would communicate the data more clearly.
Format and maintain the bar column
The bar’s available width comes from the cell, so column width is one of the main visual controls. A very narrow column makes different values look alike; an excessively wide one can dominate a compact table. Adjust the column boundary, then inspect the result at the zoom level and screen size your readers are likely to use.
You can also use normal cell formatting on the SPARKLINE cells, such as background fill, borders, and alignment. Keep any accompanying numeric values in a readable number format. If values are percentages, format the value column as percentages rather than relying on the bars to explain the unit. A bar has no built-in printed axis or data label, so the exact number and a clear heading remain important.
When a table grows, make sure the formulas cover new rows. A formula copied only through row 20 will not automatically appear in row 21 just because a new value is entered in B21. Extend the formula range or use a layout that reliably carries formulas into added rows. If the maximum is based on a fixed range, update that range when the dataset expands; otherwise, the scale may exclude new values.
SPARKLINE bars versus color scales
Use a SPARKLINE bar when length is the visual cue you want and you can spare a column for it. It shows magnitude in a familiar form and can sit beside the underlying value. Its trade-offs are an extra formula column, a scale that you must choose, and limited chart-like labeling within the small cell.
Use a color scale when you want to show low-to-high patterns directly on the values. In Sheets, select the relevant cells, choose Format > Conditional formatting, then select the color-scale option in the conditional-formatting panel. You can set minimum, midpoint, and maximum colors. This shades cells rather than drawing proportional bars, so it is not an exact substitute, but it avoids a separate bar formula column.
For a broader story—such as comparing categories across several months—a regular chart may be more suitable. A chart can include axes, labels, a legend, and more space for comparisons. Conversely, if the goal is simply to mark values over a threshold, a single conditional-formatting rule that changes the cell’s fill may be simpler than either a bar or a chart.
Common problems and fixes
- Bars look almost empty: Check whether the maximum matches the data’s units. A maximum of 100 is appropriate for values from 0 to 100, not necessarily for decimal fractions such as 0.72.
- Bars cannot be compared across rows: Use the same fixed maximum or the same dataset-wide maximum for every row. Avoid scaling each value independently.
- Some rows have no bar: Confirm that the formula was filled down and that the source cell contains a number rather than text that looks numeric.
- New records appear out of scale: Expand the range used to calculate the maximum, or choose a fixed target that remains meaningful as the sheet grows.
- The formula is rejected: Check the formula punctuation and quotation marks. Spreadsheet locale settings can affect separators, so use the separator style expected by your Google Sheets locale.
It is also easy to confuse a conditional-formatting color with a bar. A colored cell may look like a progress indicator, but unless its filled length varies with the value, it does not encode magnitude in the same way. Likewise, adding a SPARKLINE formula does not create a conditional-formatting rule that can be edited in the formatting panel; the bar is controlled by the formula and its options.
Frequently Asked Questions
Can I add data bars in Google Sheets without a formula?
There is no built-in data-bar conditional-formatting rule in Sheets. You can use a color scale or another conditional-formatting style without a formula, but a proportional in-cell bar generally requires SPARKLINE or another workaround.
Can I put the bar and number in the same cell?
A SPARKLINE graphic occupies the cell where its formula is entered, so it does not automatically display a separate source number beside the bar in that same cell. The clearest arrangement is usually a number column next to a SPARKLINE column.
How do I make every bar use the same scale?
Set the same maximum in each SPARKLINE formula, such as 100 for scores out of 100. If the scale should follow the data, use one shared maximum calculated from the full comparison range rather than a different maximum for each row.
Can I use conditional formatting and SPARKLINE together?
Yes. They do different jobs: SPARKLINE draws the in-cell bar, while conditional formatting can change a cell’s fill or text color when a rule is met. Keep the colors and rules restrained so the combination remains readable.
Is this the same as data bars in Excel?
No. Excel includes data bars as a conditional-formatting style, while Google Sheets does not provide that same built-in rule. SPARKLINE is a practical Sheets alternative, but its bars live in formula cells and are configured differently.
Related
- Excel Accounting vs Currency: Key Differences Explained
- Excel Data Model vs Power Query: How They Work Together
- Excel Data Analysis: Where to Click and How to Practice
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Monthly Calendar in Google Sheets: How to Create OneTo create a monthly calendar in Google Sheets, enter the month’s first date in a cell such as…
- Bi-Monthly Budget Template in Google Sheets: Setup GuideA bi-monthly budget template in Google Sheets can track income, planned spending, and actual expenses for each pay…
- How to Align Checkboxes in Excel: Step-by-StepTo align checkboxes in Excel, first identify whether they are in-cell checkboxes or floating objects. For in-cell checkboxes,…
- How to Share a Calendar Invite in Outlook on Any DeviceTo share a calendar invite in Outlook, create or open the event, add the recipients as attendees, then…
- Absolute Cell Reference Excel Shortcut: F4 ExplainedIn Excel for Microsoft 365 on Windows, press F4 while editing a formula and the insertion point is…
- How to Add an Exchange Shared Mailbox in Outlook 365To add an Exchange shared mailbox in Outlook, first have your Microsoft 365 or Exchange administrator grant your…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.