Creating a chart with dynamic labels
The trick of this chart is to show data from specific cells in the chart labels:
For example, if you have to show in one chart two different data bars:
- To compare two different teams, you should create a chart using the percent of task completion (in this example, cells C14:D14).
- But it will be more informative to see the real volume for every team (in this example, cells C12:D12). Or the simple formulas:
Team A: = CONCATENATE (IF (C14 > D14, "Winner - ", "Loooser - "), TEXT (C12, "#0"))
Team B: = CONCATENATE (IF (C14 < D14, "Winner - ", "Loooser - "), TEXT (D12, "#0"))
For the existing chart (for example, see how to create a simple competition chart), do the following:
Add the data series labels
1. Select the data series, then do one of the following:
- Click on the Chart Elements button, select the Data Labels list, then select the position of the labels (the options depend on the data series chart type):
- On the Chart Design tab, in the Chart Layouts group, click the Add Chart Element button:
From the Add Chart Element dropdown list, choose Data Labels, then select the place for the labels (the options depend on the data series chart type):
- Right-click on the data series and select Add Data Labels -> Add Data Labels in the popup menu:
Add the labels values from the cells
2. Do one of the following:
- For all labels:
- Right-click on any data label and select Format Data Labels... in the popup menu:
- On the Format Data Labels pane, on the Label Options section, in the Label Contains group, check the Value From Cells option and then choose cells in the Data Label Range dialog box:
- Right-click on any data label and select Format Data Labels... in the popup menu:
- For the specific label: double-click on the label value, then select Choose Cell in the popup menu, and specify the value in the Data Label Reference dialog box:
Make any other adjustments to get the look you desire. See more examples of 5 Excel features to create data-dependent visualizations.
See also this tip in French: Créer un graphique avec des étiquettes dynamiques.