×

Array Formula in Excel

How to use Array Formula in Excel?

By default, Excel consists of various formulas for calculating the data. Among various formulas, the Array formula is a powerful one that is used to calculate tough or complicated calculations. Array formulas are known as the CSE formula pressing “Ctrl+Shift+Enter” to be used to enter the data. The variation purpose of the array formula includes Counting characters and the Sum of the nth value and numbers in the range of cells. Array formula in Excel performs two types of calculations such as:

  • Performing multiple calculations to display the single result
  • Perform calculations to generate multiple results.

Usually, the array formula is used to replace multiple formulas to get the result quickly and saves time. It generates multiple results, and it processes multiple values in a single time based on the given conditions. Sometimes it returns multiple values. Hence the result obtained is also in the array format.

Array in Excel

The array is defined as a collection of items. Items include numbers or alphabets in a single row, column, or multiple rows and columns. Here is an example to illustrate the data using the array formula. The steps to be followed are,

Step 1: To enter the five fruits' names in the cell, select the cell range from A1:E1.

Step 2: Type the data proceeded by an equal sign as = {"APPLE", "ORANGE", "PINEAPPLE", "GUAVA", "MANGO”}

Array Formula in Excel

Step 3: Press Enter key or click CTRL+SHIFT+ENTER. The result will be displayed in the cell as shown in the image.

Array Formula in Excel

Example 1: The data contains the stationery items with the quantity of how much it is sold and the amount. How to calculate the total of all sales?

The first method to calculate the total of all sales using the normal Excel formula as follows,

Step 1: Enter the data in the spreadsheet from the row and column range A1:C7.

Array Formula in Excel

Step 2: To find the subtotal enter the formula in the cell D2 as =B2*C2. Drag the formula down to fill the entire column from range D3:D7. The result will be displayed in cell D2.

Array Formula in Excel

Step 3: Enter the formula in cell D8 as = SUM (D2:D7) to calculate the sub-total.

Array Formula in Excel

From the above worksheet, the subtotal is calculated using the formula.

An alternative method to calculate the “total sales” using the array formula is as follows,

Step 1: Enter the formula in the cell D8 as =SUM (B2:B7*C2:C7)

 Step 2: Press Enter key or click CTRL+SHIFT+ENTER using the keyboard shortcut.

Array Formula in Excel

From the above worksheet, the result displayed in cell D8 using the array formula is similar to the previous concept using the normal Excel formula. It shows that an array is a powerful formula that saves time. Hence from the above two methods, the array can calculate more than one calculation and returns a single result based on the data.

Example 2: How to get the result in a single-cell array formula from the given data?

The data contains the list of items, and sales for two months are described. How to calculate the maximum sales in the given data?

Step 1: Enter the data in the spreadsheet in the respective row and column, A1:C7.

Array Formula in Excel

Usually, in the general method to calculate the maximum sales, the formula used is =C2-B2. It is entered in the new cell D1 and drags the formula downwards. After calculating, sum the data which is present in the column range D2:D7.Similarly, an alternative method is calculating the maximum sale using an array formula.

Step 2: Enter the formula in the cell C8 as =MAX (C2:C6-B2:B6). The result is displayed in the cell.

Array Formula in Excel

The above worksheet shows the result in cell C8 as 50, which is the maximum sale increase for the given data without the need for the new column.

Example 2.1: How to get the result in a multi-cell array formula from the given data?

The given data consists of product, price, and quantity of product sold. Suppose the user needs to pay a 10% tax for each sale. To calculate the tax amount for each product, the array formula is used to calculate the result.

1. Enter the data in the spreadsheet from the row and column range, namely A1:C7

Array Formula in Excel

2. To calculate the tax, select the cell range from D2:D6 and enter the formula in the formula bar as =B2:B6*C2:C6*0.1

Array Formula in Excel

3. The result will be displayed in the above image, which calculates the result for the selected cell using the array formula.

Example 3: How to convert the array into a multi-cell array?

To convert the array into a multi-cell array, the transpose function transposes the data in the table.

Here, the data in the row are converted to columns using the transpose function. The steps to be followed are,

1. Enter the data in the respective row and column.

Array Formula in Excel

2. Select the range of empty cells to display the transposed data. An equal number of rows and columns is selected to display the data. Here 7 columns and 4 rows are selected called F1:L4.

Array Formula in Excel

3. In the formula, bar enters the formula as =TRANSPOSE ($A$1:$D$7)

4. Press CTRL+SHIFT+ENTER or press Enter key. The transposed data will display in the new location.

Array Formula in Excel

The following steps above convert the array data into transposed data using the TRANSPOSE function.

Array constants in Excel

The values in the array constant won't modify if the formula is copied to other values or cells. In Excel, the array constants are sub-divided into the following types,

  1. Horizontal array constant
  2. Vertical array constant
  3. A two-dimensional array is constant.

Horizontal array constant

The horizontal array is represented in the row. The data are represented using commas and braces at the start and end of the data.

The steps to be followed to represent the horizontal array are,

Step 1: Select the empty cells where the data needs to be displayed. Here the ranges selected are A1:E5.

Step 2:  Type the formula in the formula bar as = {1, 2, 3, 4}

Step 3: Press CTRL+SHIFT+ENTER or press Enter key. The data will be displayed in the selected cell as follows,

Array Formula in Excel

Vertical array constant

The vertical array is represented in the column. The data are represented using semicolons and braces at the start and end of the data.

The steps to be followed to represent the vertical array are,

Step 1: Select the empty cells where the data needs to be displayed. Here the column ranges selected are A1:A5.

Step 2:  Type the formula in the formula bar as = {1; 2; 3; 4; 5}

Step 3: Press CTRL+SHIFT+ENTER or press Enter key. The data will be displayed in the selected cell as follows,

Array Formula in Excel

Two-dimensional Array Constant

The two-dimensional Array constant is represented in the respective row and column. The row data are represented using a semicolon, and column data are represented using commas and braces at the start and end of the data.

The steps to be followed to represent the two-dimensional array constant are,

Step 1: Select the empty cells where the data needs to be displayed. Here the row and column ranges selected are A1:E2.

Step 2:  Type the formula in the formula bar as

 = {"1"," 2"," 3"," 4", "5"; a, b, c, d, e}

Step 3: Press CTRL+SHIFT+ENTER or press Enter key. The data will be displayed in the selected cell range as follows,

Array Formula in Excel

Example 4: Using the Array formula, how to sum the 'N' largest numbers?

To sum the ‘N’ largest number, the steps to be followed are,

1. Enter the data in a column from the range A1:A5.

Array Formula in Excel

2. Select a new cell to display the result of the sum of 'N' largest numbers. Enter the formula as =SUM (LARGE (A1:A5, {1, 2, 3}). Here the LARGE function is used to sum the 'n' largest numbers.

3. Press CTRL+SHIFT+ENTER or press Enter key. The array formula returns the sum of the largest three numbers in the respective cell.

Array Formula in Excel

Example 5: Using the Array formula, how to sum the 'N' Smallest numbers?

To sum the ‘N’ smallest number, the steps to be followed are,

1. Enter the data in a column from the range A1:A5.

Array Formula in Excel

2. Select a new cell to display the result of the sum of 'N' smallest numbers. Enter the formula as =SUM (SMALL (A1:A5, {1, 2, 3}). Here the SMALL function is used to sum the 'n' smallest numbers.

3. Press CTRL+SHIFT+ENTER or press Enter key. The array formula returns the sum of the three smallest numbers in the respective cell.

Array Formula in Excel

Example 5: Array function for applying multiple conditions

In this example, the array function calculates the data using multiple conditions. The steps to be followed are,

1. Enter the data in the spreadsheet in the respective row and columns.

Array Formula in Excel

Step 2: To find the order taken by Mehta, the formula to be used as =SUM (COUNTIFS (B2:B10, "Mehta", C2:C10 {"Books"})) is entered in the new cell. Here COUNTIFS function is used to calculate multiple conditions, where the formula includes multiple conditions.

Array Formula in Excel

From the above worksheet, the result is displayed as 2, which Mr. Mehta sells the number of orders (BOOKS)

Example 6: OR operator in Array

Using OR operator in Excel, it displays TRUE if any of the conditions are applicable. The steps to be followed to use OR operator is,

1. Enter the data in the spreadsheet in the respective row and columns.

Array Formula in Excel

2. To count the Number of Books Sold by Mehta, enter the formula in the cell using OR operator as =SUM (IF (((B2:B10=”MEHTA”) + (C2:C10=”BOOKS”)), (D2:D10)))

Array Formula in Excel

From the above worksheet, the result is displayed as 137, which is the total goods sold by Mehta. The OR sums the goods, including (BOOKS, TOYS, and VEGETABLES) as the function includes the data if anyone of the condition is true.

Example 7: AND operator in Array

The AND operator in Excel displays TRUE if all the conditions are applicable. The steps to be followed to use AND operator are as follows,

1. Enter the data in the spreadsheet in the respective row and columns.

Array Formula in Excel

2. To count the Number of Books Sold by Mehta, enter the formula in the cell using AND operator as

=SUM ((B2:B10=”MEHTA”) *(C2:C10=”BOOKS”)*(D2:D10))

Array Formula in Excel

From the above worksheet, the result is displayed as 66, which is the total number of books sold by Mehta. The AND function returns the result if all the conditions are true, which means it sums only the goods of Books.

Unary operator in Array

Excel provides a default unary operator symbol called (--), called a double dash. The purpose of the double dash unary operator is to convert the non-numeric values into 1 or 0, where the array function can understand. The methods to use the unary operator in Array are as follows,

1. Enter the data in the respective column, namely A1:A5. Here the various dates are entered in the column.

2. Select a new cell, B1, to type a new value to find how many times a particular month's dates are repeated.

3. Select a new cell and enter the formula as

=SUM (--(MONTH (A1:A5) =B1)). Here B1 contains the value of '7', where the formula finds how many times the month 'JULY' is repeated.

Array Formula in Excel

From the above worksheet, the value is displayed as 2 where the column ranges A1:A5 contains two July month data. Here the Array takes 1 as 'January', '2' as February,' 3' as March so on so. Similarly, '7' indicates the July month which needs to be counted.

Summary

From the above method, the various functions and methods of the Array formula are explained clearly.


Related Topics

Excel COUNT() Function

Excel COUNT() Function The COUNT() function counts the number of cells in a range that contain numbers. Syntax COUNT([value1], [value [2], ...) Parameter value1(required)- This parameter represents the first cell in the range. value2, …(optional)- It represents the...

1 minute read.

Quarter Dates in Excel

Excel is a combination of numeric values and alphabets. The user's project consists of the date depending upon their accounting and financial analysis. Sometimes there is a need to find...

4 minutes read.

Operators in Excel

In MS Excel, operators are used to defining the operation you want to perform on the used elements or between variables. There are four types of operators: Arithmetic operators, Comparison...

4 minutes read.

Excel MATCH () Function

Excel MATCH () Function The MATCH () function in excel locates the position of a lookup value in a row, column, or table and returns the relative position of an item in an array. Syntax MATCH...

2 minutes read.

Count Characters in Excel

Microsoft Excel is used to perform calculations for multiple purposes. The data entered in the worksheet is a combination of numeric and alphabets. Sometimes there is a need to check...

4 minutes read.

Excel WORKDAY() Function

Excel WORKDAY() Function The WORKDAY() function in excel returns the serial number of the date before or after a specified number of workdays. Syntax WORKDAY (START_DAY, DAYS, [HOLIDAYS]) Parameter START_DAY (required)- This parameter represents the...

1 minute read.

Excel LEFT() Function

The LEFT () function in excel returns the leftmost characters from a text value. This function is used for data manipulation. Syntax LEFT(Text, [num_chars]) Parameter Text (required)- This parameter represents the string from which you want to...

1 minute read.

SumIF Formula in Microsoft Excel

SUMIF Formula in Microsoft Excel is considered the primary and vital formula individuals can use to remove their workload. In this tutorial, we will discuss and learn about the SUMIF Formula...

7 minutes read.

Excel ROUNDUP() Function

Excel ROUNDUP() Function The ROUNDUP() function in excel returns a number rounded up to the nearest possible value and away from zero. Syntax ROUNDUP(Number, num_digits) Parameter Number(required)- This parameter represents the number which you want to...

1 minute read.

How to import Microsoft Access data into the Microsoft Excel

Microsoft Access is primarily considered vital and the primary tool for individuals who want to create and manage the respective type of Database efficiently. This tutorial will discuss how to import...

5 minutes read.

Separate Strings in Excel

How to Separate String in Excel Day by day, Microsoft Excel is increasing for business and personal use. It is a combination of numbers and alphabets based on the data provided....

4 minutes read.

Pivots Table in Excel

What is a Pivot? A pivot table is a tool to create summary reports from data-sets irrespective of their sizes but is helpful even if the data is more than just...

5 minutes read.

Paste Options in Excel

Excel spreadsheet is a combination of numeric values, alphabets which is used for calculation purposes. While performing the calculations, there is a need to repeat the data for further process....

6 minutes read.

Excel Themes

Microsoft Excel contains various features to enhance the appearance of the worksheet like text color, font size and general outlook of the objects. The users are provided with multiple theme...

3 minutes read.

Excel SECOND() Function

Excel SECOND() Function The SECOND() function in excel converts a serial number to SECOND (0 - 59). Syntax SECOND (SERIAL_NUMBER) Parameter SERIAL_NUMBER (required)- This parameter represents the date or time from which you want to extract...

1 minute read.

How to Alphabetize in Excel?

Alphabetize in Excel One of the reasons for Excel's widest popularity is its ability to swiftly and effortlessly sort data. Excel facilitates easy methods that alphabetically sort the lists of strings...

5 minutes read.

How to make use of the Wildcard in Excel

In this modern world, it is known that the wildcard characters in Microsoft Excel are considered to be the most essential and unrated features of Microsoft Excel. Besides all these,...

8 minutes read.

Insert Row in Excel

It was known that we have various multiple ways that are extremely helpful in inserting a particular row in the Microsoft Excel. And we have lots of shortcut options available...

6 minutes read.

Nearest Multiple in Excel

In Excel, the values in Multiplication can be round up, down and to nearest Multiplication number using Excel default function. This makes the calculation to be performed in an easier...

3 minutes read.

Data Analysis in Excel

Data Analysis in Excel Data analysis is a powerful tool that helps the users to make better decisions by comparing different information. Microsoft Excel extends its credibility to enforce the data analysis tool...

6 minutes read.