Chart & Visualization Issues

Display Excel Data Bars with Progress Text Such as 2 / 6

Nimra MalikNimra Malik Nov 22, 2026 868 views

Question details

Display a conditional formatting data bar and progress text such as 2 / 6 in the same Excel cell.

Display Excel Data Bars with Progress Text Such as 2 / 6
Product
Microsoft Excel
Device & OS
not provided
Scenario
A user wants to visualize the number of completed items out of a fixed total.
Observed behavior
Combining the numeric result with text makes the cell text rather than a numeric value, preventing the data bar from working as intended.
Before you start

Identify the cells to count and the fixed total for the progress bar. The example below counts nonempty cells in A2:A7 and uses a maximum of 6.

Solution 1Recommended

Keep the Excel cell numeric and add progress text with a custom format

Use this method to show a data bar and a fixed denominator in the same cell.

The formula returns a number, while the custom format adds the visible denominator without changing the underlying value.

1
Enter the count formula

Select a cell outside A2:A7, such as B2, and enter =COUNTA(A2:A7).

2
Add the progress format

Right-click B2, select Format Cells, and open Number > Custom. Enter 0" / 6" in the Type box, then select OK.

3
Apply a data bar

With B2 selected, go to Home > Conditional Formatting > Data Bars and choose a bar style.

4
Set the scale

Go to Home > Conditional Formatting > Manage Rules, select the data bar rule, and choose Edit Rule. Set Minimum to Number 0 and Maximum to Number 6. Make sure Show Bar Only is unchecked, then select OK.

Keep the Excel cell numeric and add progress text with a custom format
The denominator is fixed: The / 6 text comes from the number format. If the total changes, update both the custom format and the data bar maximum. COUNTA also counts cells containing formulas that return an empty string.
Work with progress data in WPS

Create a progress data bar in WPS Spreadsheets

Use a numeric count, a custom number format, and conditional formatting to display progress text with a data bar in WPS Spreadsheets.

  1. 1. Enter the count: Open the worksheet in WPS Spreadsheets, select a cell outside the source range, and enter =COUNTA(A2:A7).
  2. 2. Format the result: Right-click the result cell and choose Format Cells. Under Number > Custom, enter 0" / 6" and confirm.
  3. 3. Add a data bar: Select the result cell, then choose Home > Conditional Formatting > Data Bars and select a style.
  4. 4. Adjust the rule: Open Home > Conditional Formatting > Manage Rules, edit the data bar rule, and set the minimum to 0 and maximum to 6. Leave Show Bar Only unchecked so the progress text remains visible.
Show a numeric progress value and data bar in one cellOpen and save Microsoft Excel XLSX filesUse familiar spreadsheet formulas and formatting toolsWork with spreadsheets in a free Office suite
microsoft office alternative - wps office

Frequently Asked Questions

Why does a data bar not work when I type 2 / 6 into a cell?

Excel treats an entry such as 2 / 6 as text rather than the numeric count needed for the data bar. Enter the numeric value or a formula, then use Format Cells > Number > Custom to display the denominator.

How do I show the number on top of the data bar?

Go to Home > Conditional Formatting > Manage Rules, edit the data bar rule, and clear Show Bar Only.

Can the denominator change automatically with another cell?

A custom number format cannot directly reference another cell, so the / 6 in this example is fixed. If the total changes, edit the custom format and the data bar maximum to match it.

What does COUNTA count in the example?

The formula =COUNTA(A2:A7) counts nonempty cells in that range, including cells with formulas that return an empty string. Use a different counting formula if those cells should be excluded.