Table Of Contents

arrow

Array Formulas in Excel

Last Updated :

-

Blog Author :

Edited by :

Reviewed by :

Explanation of Array Formulas in Excel

Array formulas in Excel are powerful formulas that help us perform very complex calculations.

We learned from the above examples that these formulas in Excel simplify complex and lengthy calculations. There is one thing to remember. However, in example 2, we returned multiple values using these formulas in Excel. We cannot change or cut the cell's value as it is a part of an array.

Suppose we want to delete cell G6 Excel. It will give us an error. Even if we change the value in the cell type, any random value in the cell Excel will provide an error.

For example, type a number in cell G6 and press the “Enter” key. It may provide the following error,

Upon typing a random value 56 in cell G6, it may give an error that we cannot change a part of the array.

If we need to edit an array formula, go to the function bar and edit the provided values or range. If we want to delete the array formula, delete the whole array, i.e., cell range B6 to G6.

How to Use Array Formulas in Excel?

Let us learn an array formula by a few examples:

One can use array formulas in two types:

  1. If we want to return a single value, use these formulas in a single cell, as in example 1.
  2. If we want to return more than one value, use these formulas in Excel by selecting the range of cells as in example 2.
  3. Press CTRL + Shift + Enter to make an array formula.

Example #1

A restaurant's sales data consists of each product's price and the number of products sold.

The owner wants to calculate the total sales done by those products.

Arrays Formula in Excel example 1

The owner multiplies the number of items sold for each product then sums them up as in the given-below equation,

Arrays Formula in Excel example 1-1

Also, he gets the total sales as given below:

Arrays Formula in Excel example 1-2

But this is a lengthy task. If the data were bigger, it would be much more tedious. So instead, Excel offers array of formulas for such tasks.

Arrays Formula in Excel example 1-3

We will create our first array formula in cell B7.

The following are the steps to make the first array: -

  1. In cell B7, type =SUM and press the “tab” button on the keyboard. It may open up the sum formula.


    Arrays Formula in Excel example 1-4

  2. Select the cell range from B2 to G2.


    Arrays Formula in Excel example 1-5

  3. Now, put an asterisk “*” sign after B2:G2 to multiply.


    Arrays Formula in Excel example 1-6

  4. Select the cell range from B3 to G3.


    Arrays Formula in Excel example 1-7

  5. Instead of pressing the “Enter” key, press “CTRL + SHIFT + ENTER.”


    Arrays Formula in Excel example 1-8

    As a result, Excel may provide the total sales value by multiplying the number of products by the price in each column and summing them up. For example, in the highlighted section, we can see that Excel has created an array for cell range B2 to G2 and B3 to G3.

    Arrays Formula in Excel example 1-9

    The above example explains how Excel array formulas return a single value for an array or set of data.

Example #2

With the same data, what if the owner wants to know the sales for each product separately, like sales of products 1 and 2?

Arrays Formula in Excel example 2

He can either go a long way. In each cell, perform a function that will calculate the sales value.

Arrays Formula in Excel example 2-1

The equation mentioned in cell B5 will be required to repeat for cells C4, D4, etc.

Again, it would be a tedious task if it were larger data.

In this example, we will learn how array formulas in Excel return multiple values for a set of arrays.

Example 2-2

#1 - Select the cells where we want our subtotals, i.e., per product sales for each product. In this case, it is a cell range B8 to G8.

Example 2-3

#2 - Type an equal to sign “=” a

Example 2-4

#3 -Select cell range B2 to G2.

Example 2-5

#4 - Type an asterisk “*” sign after B2:G2.

Example 2-6

#5 - Now, select cell range B3 to G3.

Example 2-7

#6 - Do not press the "Enter" key for the array formula. Press â€śCTRL + SHIFT + ENTER” for array formula.

Example 2-8

The above example explains how an array formula can return multiple values for an array in Excel.

Cells B6 to G6 are an array.

Example #3

For the same restaurant owner, he has the restaurant sales data for six months Jan, Feb, March, April, May, and June. He wants to know the average growth rate for sales.

Example 3

The owner can normally subtract the sales value of Feb month to Jan in cell C2 and then calculate the average.

Example 3-1

Again, it would be a tiresome task if this were larger data. So let us do this with the array in Excel formulas.

#1 – In cell D8, type =average. Then, press the "tab" button.

Example 3-2

#2 – To calculate growth, we will need to subtract the values of one month from the previous month to select the cell range from B3 to B7.

Example 3-3

#3 – Put a subtract (-) sign after B3:B7,

Example 3-4

#4 – Now, select cells from B2 to B6.

Example 3-5

#5 – As for the array in Excel, do not press the "Enter" key. Press â€śCTRL + SHIFT + ENTER.”

Example 3-6

Array formulas in Excel easily calculated the average growth for the sales without any hassle.

The owner now does not require calculating each month's growth and performs the average function after that.

Things to Remember

  1. These are also known as CSE Formulas or Control Shift Enter Excel Formulas.
  2. Do not make parenthesis for an array; Excel itself does that. It would return an error or incorrect value.
  3. Entering the parenthesis "{"manually, Excel will treat it as a text.
  4. Do not press the "Enter" key. Instead, press "CTRL + SHIFT + Enter" to use an array formula.
  5. We cannot change the cell of an array. So, to modify an array formula, either modify the formula from the function bar or delete the formula and redesign it in the desired format.