How do you create an in-cell bar chart in Excel?

To create an in-cell bar chart in Excel, you can use the REPT formula to repeat a character or symbol a certain number of times based on a cell value. First, create a column or row of data that represents the values for your bar chart. Then, select the cell where you want the bar chart to appear and enter the formula =REPT(“|”,A1) where A1 is the cell containing the value for the first bar. This will create a bar using the “|” symbol that is the same number of characters as the value in cell A1. Drag the formula down or across to cover all the data, and you will have an in-cell bar chart showing the relative values of your data.


Often you may want to create an in-cell bar chart in Excel, such as the following chart:

Fortunately this is easy to do by using the Conditional Formatting feature in Excel.

The following example shows how to do so.

Example: How to Create In-Cell Bar Chart in Excel

First, let’s enter the following dataset that shows the total points scored by basketball players on various teams:

Suppose we would like to insert bars into column B to visualize the number of points scored by each player.

To do so, highlight the cell range B2:B11, then click the Conditional Formatting icon on the Home tab along the top ribbon, then click Data Bars, then click More Rules:

In the new window that appears, check the box next to Show Bar Only.

If you’d like, you can also specify a fill color and border color to use for the bars.

We will use the default options and then click OK:

The following bars will be inserted into column B:

Note: If you would like the underlying values of the bars to be shown, then don’t check the box next to Show Bar Only.

The length of the bars represent the number of points scored by each player.

For example, the Mavs player had the most points scored (40) which is why they have the longest bar.

Conversely, the Thunder player had the least points scored (11) which is why they have the shortest bar.

Additional Resources

The following tutorials explain how to perform other common operations in Excel:

x