Change an Excel Cell and Add a Conditional Formatting Data Bar
Question details
The user wants to edit an Excel cell and add a data bar that represents the number of days required for a task.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Update a task duration and visualize it with conditional formatting.
- Observed behavior
- The cell should contain the updated number of days and display a data bar scaled to the selected values or defined limits.
Identify the cell or range containing task durations and make sure the durations are stored as numbers. If you want to compare several tasks, select their duration cells together when adding the data bars.
Edit the cell and apply an Excel data bar
Use Excel's conditional formatting to show task durations as bars within cells.
Click the cell and type a replacement value, then press Enter. To edit the existing entry instead, double-click the cell or select it and press F2.
Click the updated cell, or select the range of numeric duration cells you want to compare.
On the Home tab, select Conditional Formatting > Data Bars, then choose a color and fill style.
With the formatted cells selected, go to Home > Conditional Formatting > Manage Rules. Select the data bar rule, choose Edit Rule, set the minimum and maximum types and values, and click OK.

Edit task durations and add data bars in WPS Spreadsheet
Use WPS Spreadsheet to update a duration and apply conditional formatting data bars to visualize values in your worksheet.
- 1. Open the workbook: Open WPS Spreadsheet and select Open to choose your Excel workbook.
- 2. Update the duration: Click the task duration cell, type the new number of days, and press Enter. Double-click the cell to edit its existing content.
- 3. Select the cells: Select the updated cell or the range of task durations you want to format.
- 4. Add the data bar: On the Home tab, choose Conditional Formatting > Data Bars and select a bar style.
- 5. Save the workbook: Choose File > Save or Save As to save the formatted workbook in your preferred Excel format.

Frequently Asked Questions
How do I edit part of a cell without replacing everything?
Select the cell and press F2, or double-click it, then edit the existing content and press Enter.
Can I apply data bars to several task durations at once?
Yes. Select the range of numeric duration cells, then choose Home > Conditional Formatting > Data Bars and select a style.
How do I set a fixed maximum number of days for the bar?
Select the formatted cells and go to Home > Conditional Formatting > Manage Rules. Edit the data bar rule and set the maximum type and value, then click OK.
Why does a single cell's data bar look full?
Automatic scaling uses the values in the formatted range. For a single cell, edit the data bar rule in Conditional Formatting > Manage Rules and set explicit minimum and maximum values.
How do I remove a data bar?
Select the formatted cell or range, then choose Home > Conditional Formatting > Clear Rules > Clear Rules from Selected Cells. This removes all conditional formatting rules from that selection.




