Display Excel Data Bars with Progress Text Such as 2 / 6
Question details
Display a conditional formatting data bar and progress text such as 2 / 6 in the same Excel cell.

- 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.
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.
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.
Select a cell outside A2:A7, such as B2, and enter =COUNTA(A2:A7).
Right-click B2, select Format Cells, and open Number > Custom. Enter 0" / 6" in the Type box, then select OK.
With B2 selected, go to Home > Conditional Formatting > Data Bars and choose a bar style.
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.

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. Enter the count: Open the worksheet in WPS Spreadsheets, select a cell outside the source range, and enter =COUNTA(A2:A7).
- 2. Format the result: Right-click the result cell and choose Format Cells. Under Number > Custom, enter 0" / 6" and confirm.
- 3. Add a data bar: Select the result cell, then choose Home > Conditional Formatting > Data Bars and select a style.
- 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.

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.




