# Microsoft Office Application Help - Excel Help forum > Excel Charting & Pivots >  >  Labels on a chart

## omletto

Hi all,

Please see attached spreadsheet as example.  I want the chart to be dynamic, but as I select a load of blank cells, it shows a number instead of the field name.  It will only pull through the field name if i select cells with data in them.  I dont want to keep going back and changing the area for the graph, is there a way of automating that?

All help would be appreciated.

Thanks,

Om

----------


## Andy Pope

The chart is displaying 1,2,3 etc. because you have not provided any range for it to use as category labels.
Select the chart and then use the Select Data dialog to select the Horizontal axis range.

If you want the chart to only show valid data then use a table. Or named ranges to define chart data and labels.

----------

