Formatting Issues

Change an Excel Cell and Add a Conditional Formatting Data Bar

Adam DavisAdam Davis Nov 18, 2026 869 views

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.

Change an Excel Cell and Add a Conditional Formatting Data Bar
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.
Before you start

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.

Solution 1Recommended

Edit the cell and apply an Excel data bar

Use Excel's conditional formatting to show task durations as bars within cells.

1
Change the cell value

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.

2
Select the duration cells

Click the updated cell, or select the range of numeric duration cells you want to compare.

3
Apply a data bar

On the Home tab, select Conditional Formatting > Data Bars, then choose a color and fill style.

4
Adjust the scale if needed

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 the cell and apply an Excel data bar
How the bar is scaled: By default, Excel scales data bars using the values in the formatted range. Set explicit minimum and maximum values if a single cell needs to be measured against a particular limit.
Work with data bars in WPS

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. 1. Open the workbook: Open WPS Spreadsheet and select Open to choose your Excel workbook.
  2. 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. 3. Select the cells: Select the updated cell or the range of task durations you want to format.
  4. 4. Add the data bar: On the Home tab, choose Conditional Formatting > Data Bars and select a bar style.
  5. 5. Save the workbook: Choose File > Save or Save As to save the formatted workbook in your preferred Excel format.
Edit task duration cells and visualize values with data bars.Open and save Microsoft Excel XLSX and XLS files.Use a familiar ribbon interface for spreadsheet formatting.Work with spreadsheets using a free, easy-to-use office suite.
microsoft office alternative - wps office

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.