Microsoft Office Tutorials and References
In Depth Information
Creating Data Bars
Creating Data Bars
A data bar is a conditional format that adds a horizontal bar to the background of a cell
containing a numeric value. When applied to a range of cells, the data bars have the
same appearance as a bar chart with each cell containing one bar.
The lengths of data bars are based on the value of each cell in the selected range.
Cells with larger values have longer bars; cells with smaller values have shorter bars.
Data bars are dynamic, which means that if one cell’s value changes, the lengths of the
data bars in the selected range are automatically updated.
Data bars differ from sparklines in that the bars are always placed in the cells
containing the value they represent and each cell represents only a single bar from the bar chart.
By contrast, a column sparkline can be inserted anywhere within the workbook and can
represent data from several rows or columns. However, like sparklines, data bars can be
used to create compact graphs that can be easily integrated alongside the text and values
stored in your worksheet cells.
Ajita wants you to add data bars to the sector percentage values in the Sectors
worksheet. The data bars will provide a visual picture of how the New Century Fund and the
S&P 500 compare in their investments in different sectors.
To add data bars to the sector percentages:
1. In the Sectors worksheet, select the range C4:D15 .
2. Click the Home tab on the Ribbon.
3. In the Styles group, click the Conditional Formatting button, and then point to
Data Bars to display the Data Bars gallery.
4. In the Solid Fill group, click Blue Data Bar (the first data bar style). The data bars
are added to the selected cells.
5. Click cell to deselect the sector percentages range. See Figure 4-40. A2
Data bars added to the Sectors worksheet
the largest cell value
in t he range has the
longest bar, filling
the width of the cell