Data Bars in Excel (Insert, Format, and Deal with Negative Values)

This is an overview:

Overview of Data Bars in Excel


Download Practice Workbook


 

How to Insert Data Bars in Excel?

  • Select data and choose a Gradient Fill: go to Home>>Conditional Formatting>>Data Bars.

Inserting data bars with Gradient Fill using Conditional Formatting feature

  • Data bars will be inserted for the selected data.

Final result with Gradient filled data bars

  • You can also choose solid fill: choose a color in Solid Fill (Home>>Conditional Formatting>>Data Bars).

Inserting data bars with Solid Fill using Conditional Formatting feature

This is the output.

Final output with Solid Fill data bars


How to Format Data Bars in Excel?

1. Creating Custom Data Bars

  • In the Home tab, open Conditional Formatting.
  • Choose More Rules in Data Bars.

Visiting More Rules to format data bars

  • In the New Formatting Rule window, choose Format all cells based on their values.
  • Customize the data bars. Here, Gradient Fill was chosen in Fill.
  • Change the Color and Direction , as shown below and click OK.

Changing Fill Color and Direction from the New Formatting Rule window

This is the output.

Final result with creating custom data bars


2.  Format Data Bars Using a Formula

  • Go to More Rules in Conditional Formatting.
  • in New Formatting Rule click Format all cells based on their values.
  • Change the type to Formula.
  • Enter the formula (with the MIN and MAX functions), and click OK.
=MIN($C$5:$C$16)*0.8
=MAX($C$5:$C$16)*1.07

Using formula inside the New Formatting Rule window

This is the output.

Final result with data bars using formula


 Format Data Bars Based on Another Cell Value

  • Select D5 and enter the formula;
  • Drag down the Fill Handle to see the result in the rest of the cells.

Formula to copy the same values from one column to another

  • Go to New Formatting Rule and choose Format all cells based on their values.
  • Check Show Bar Only and click OK.

Selecting Show Bar Only to create data bars without values

This is the output.

Final result with data bars based on another cell value


4. Format data bars Setting the Minimum and Maximum Value

  • Open the New Formatting Rule window and select Format all cells based on their values.
  • Choose Number.
  • Enter minimum and maximum values and click OK.

Setting minimum and maximum values for data bars

This is the output

Final output with creating data bars by setting minimum and maximum value


5. Format Data Bars with Negative Values

The dataset showcases WALMART stock prices in different Months. There are negative prices.

Sample dataset to create data bars with negative value

  • Open the New Formatting Rule window and choose Format all cells based on their values.
  • Choose a color for the positive values and select Negative Value and Axis options.

Visiting Negative Value and Axis option from the New Formatting Rule window

  • Choose a Fill color for negative values and click OK.

Choosing Fill Color for the negative values

This is the output

Final result with creating data bars for negative values


Which Things to Remember While Using Data Bars in Excel?

  • You can also change the data bars orientation to vertical position.

Frequently Asked Questions

1. How do I remove data bars from a cell or range in Excel?

Answer: Go to the Home tab, click Conditional Formatting, and choose Clear Rules.

2. What types of data can be represented using data bars in Excel?

Answer: Data bars can represent numerical data: values, percentages or other numerical inputs with formulas.

3. How do I adjust the width or length of data bars in Excel?

Answer: Select the cells or range with data bars and go to the Home tab. Select Conditional Formatting and choose Manage Rules.


Data Bars in Excel: Knowledge Hub

<< Go Back to Conditional Formatting | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Wasim Akram
Wasim Akram

Wasim Akram holds a BSc degree in Industrial and Production Engineering from Ahsanullah University of Science and Technology. Over the past 2 years, he has been actively contributing to the ExcelDemy project, where he has authored more than 150 articles. Now, he is working as an Excel VBA and Content Developer. He likes learning new things about Microsoft Office, especially Excel VBA, Power Query, Data Analysis, and Excel Statistics. He is also very interested in machine learning and... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo