# What is a dynamic array formula in Excel

In this tutorial, we will learn about dynamic array formulas in Excel, which allow us to write a single formula that returns multiple results and spills them into adjacent cells. We will cover various exercises, exploring array creation, dynamic array functions, and combining functions for powerful data manipulation. By the end, you’ll have a solid understanding of dynamic array formulas and their applications.

## Step-by-step Details

### Exercise 1: Creating Arrays and Understanding Spill Ranges

Let’s start with a warm-up exercise to understand the concept of dynamic array formulas.

1. Enter the following formula and then hit Enter:

={1,2,3}

You’ll notice the formula returns 3 values, and so Excel ‘spills’ those values into 3 cells horizontally:

Notes:

- The curly braces { } indicate the start and end of an array.
- Separate the values with commas to create an array presented in columns.
- Press Enter to see the results.

2. To spill the results vertically, use the formula:

={1;2;3}

Notes:

- The semicolon creates an array presented in rows.

- That is, it changes the spill direction from horizontal to vertical

3. To create an array of rows and columns, use commas and semicolons as desired:

={1,2;3,4;5,6}

Notes:

- Separate rows using semicolons (;) and columns using commas (,).

- Observe the spill of results both vertically and horizontally.

### Exercise 2: Exploring Dynamic Array Functions with the SEQUENCE Function

Now, let’s dive into dynamic array functions, starting with the SEQUENCE function.

The SEQUENCE function creates a sequence of numbers based on a specified number of rows, columns, start value, and step value.

1. Enter the formula:

=SEQUENCE(3,3)

Notes:

- This formula creates a 3×3 array.
- The first argument indicates the number of rows.
- The second argument indicates the number of columns.
- Press Enter to see the spill range in action.

2. Customize the starting value and increment. Use the formula:

=SEQUENCE(3,3,100,10)

Notes:

- The third argument indicates the starting value (e.g., 100).
- The fourth argument sets the increment value (e.g., 10).
- Observe the results and the impact of different values.

### Exercise 3: Utilizing Dynamic Array Functions UNIQUE and SORT

In this exercise, we will combine the UNIQUE and SORT functions to extract unique values from a range and sort them.

Assume we have a list of items with duplicates like this:

We want to extract a list of unique values without deleting any cells in the original range. So we enter the formula:

=UNIQUE(Range)

And bam:

Note: Replace “Range” with the actual range containing the data.

To sort the unique values, we can add the SORT function around the UNIQUE function:

=SORT(UNIQUE(Range))

Notes:

- The UNIQUE function returns unique values.
- The SORT function sorts the unique values.

*Note: The spill range should be empty to avoid breaking the dynamic array formula.*

## Conclusion

Congratulations on learning the basics of dynamic array formulas in Excel! These exercises provided an overview of array creation, dynamic array functions, and their combination. However, there are many more functions and applications to explore.

If you have any suggestions or alternatives, please post a comment below!

## Sample File

## FAQs (Frequently Asked Questions):

**Q: Can I perform calculations on dynamic array spill ranges? **

A: Yes, you can write formulas that reference the spill range, and they will automatically update accordingly. Use the spill range operator # when you point to the formula cell, such as A1#.

**Q: Can I modify the spill range size manually?**

A: No, the spill range is automatically determined based on the formula’s result.

**Q: Do all Excel versions support dynamic array formulas?**

A: Dynamic array formulas were introduced in Excel 365, so they may not be available in older versions.

**Q: Are there any differences between dynamic array formulas and traditional array formulas?**

A: Yes, dynamic array formulas handle array calculations more seamlessly and do not require the use of CSE (Ctrl+Shift+Enter) like traditional array formulas.

**Q: Can dynamic array formulas spill into non-adjacent cells? **

A: No, dynamic array formulas spill results only into adjacent cells.

**Q: How can I extract specific values from a dynamic array spill range?**

A: To extract specific values, you can use functions like INDEX, SMALL, or FILTER to operate on the spill range and retrieve the desired results.

**Q: Can I use dynamic array formulas with Excel Tables?**

A: Absolutely! Dynamic array formulas can operate on columns stored within an Excel Table.

**Q: What happens if I edit the original data range used in a dynamic array formula?**

A: When the original data range used in a dynamic array formula is modified or expanded, the spill range will automatically adjust to accommodate the changes.

**Q: Are there any limitations to the size of the spill range in dynamic array formulas?**

A: The size of the spill range in dynamic array formulas is determined by the size of the resulting array, and must fit within the available number of cells.

**Q: What are some common use cases for dynamic array formulas?**

A: Dynamic array formulas are incredibly powerful and can be used for tasks such as filtering data, manipulating text, performing calculations across multiple cells, and creating flexible reports.

**Q: Can I use dynamic array formulas with functions that require ranges as arguments?**

A: Yes, dynamic array formulas can be used within functions such as SUMIFS, COUNTIFS, AVERAGEIFS, and more, allowing you to efficiently perform calculations based on specific criteria. Use the spill reference operator # when referring the the formula cell, such as A1#.

### Excel is not what it used to be.

You need the **Excel Proficiency Roadmap** now. Includes 6 steps for a successful journey, 3 things to avoid, and weekly Excel tips.

### Want to learn Excel?

Access all Undergrad and Masters lessons with a Campus Pass or CPE Pass. Includes on-demand training plus live office hours.