Name an array constant

When you use an array constant in an array formula, you can give it a name, and then you can reuse it easily.

  1. Click Formulas > Define Name.

  2. In the Name box, enter a name for your constant.

  3. In the Refers to box, enter your constant. For example, you can use ={"January","February","March"}.

    The dialog box should look something like this:

    The New Name dialog box

  4. Click OK.

  5. In your worksheet, select the cells that will contain your constant.

  6. In the formula bar, enter an equal sign and the name of the constant, such as =Quarter1.

  7. Press Enter if you have a current Office 365 subscription. Otherwise, press Ctrl+Shift+Enter.

    Note: If you have a current version of Office 365, then you can simply enter the formula in the top-left-cell of the output range, then press ENTER to confirm the formula as a dynamic array formula. Otherwise, the formula must be entered as a legacy array formula by first selecting the output range, entering the formula in the top-left-cell of the output range, and then pressing CTRL+SHIFT+ENTER to confirm it. Excel inserts curly brackets at the beginning and end of the formula for you. For more information on array constants in array formulas, see the section Naming array constants in Guidelines and examples of array formulas.

    Here's how a dynamic array will look like in Office365:

    Example of an array constant without curly braces

Notes: 

  • When you use a named constant as an array formula, remember to enter the equal sign. If you don't, Excel interprets the array as a string of text and you see an error message.

  • You can use numbers, text, logical values (such as TRUE and FALSE), and error values (such as #N/A) in your constants. You can also use numbers in the integer, decimal, and scientific formats. If you include text, you surround it with double quotes ("").

  • Array constants can't contain other arrays, formulas, or functions. In other words, they can contain only text, numbers, or characters separated by commas or semicolons. Excel displays a warning message when you enter a constant such as {1,2,A1:D4} or {1,2,SUM(Q2:Z8)}. Also, numbers can't contain percent signs, dollar signs, commas, or parentheses.

Need more help?

You can always ask an expert in the Excel Tech Community, get support in the Answers community, or suggest a new feature or improvement on Excel User Voice.

See Also

Create an array formula

Expand an array formula

Delete an array formula

Rules for changing array formulas

Expand your Office skills
Explore training
Get new features first
Join Office Insiders

Was this information helpful?

Thank you for your feedback!

Thank you for your feedback! It sounds like it might be helpful to connect you to one of our Office support agents.

×