Adds a legend to or removes a legend from a chart. This is also equivalent to clicking the Legend button on the Chart toolbar when a chart is active.
Syntax
LEGEND(logical)
Logical is a logical value specifying which command LEGEND is equivalent to.
If logical is TRUE or omitted, LEGEND is equivalent to the Legend command on the Insert menu.
If logical is FALSE, LEGEND is equivalent to the Delete command on the Edit menu.
If logical is FALSE and the active chart has no legend, LEGEND takes no action.
Related Function
FORMAT.LEGEND Determines the position and orientation of the legend on a chart
Return to index