FormulaLabel Property

Microsoft Excel Visual Basic

FormulaLabel Property

       

Returns or sets the formula label type for the specified range. Can be xlNone if the range contains no labels, or one of the following XlFormulaLabel constants. Read/write XlFormulaLabel.

XlFormulaLabel can be one of these XlFormulaLabel constants.
xlColumnLabels
xlMixedLabels
xlNoLabels
xlRowLabels

expression.FormulaLabel

expression   Required. An expression that returns one of the objects in the Applies To list.

Example

This example topic sets the AcceptLabelsInFormulas property and then sets cells B1:D1 to be column labels.

ActiveWorkbook.AcceptLabelsInFormulas = True
Worksheets(1).Range("b1:d1").FormulaLabel = xlColumnLabels