You are on page 1of 5

International Symposium

Research and Education in Innovation Era


3rd Edition Arad 2010

WORKING WITH ARRAY FORMULAS IN MS-EXCEL


Mariana Nagy, Nicolae Margean, Valentin Burca, Mihaiela Vizental
Abstract
The paper presents the array formula - a special class of formula in MS-Excel that
facilitates calculations for matrixes and matrix formulas. Examples are given to
prove the utility of array formula in mathematics and statistics
Mathematics Subject Classification: Statistics and Calculus
Keywords: array formula, braces, matrix calculations

The array formula in MS-Excel

An array formula can perform multiple calculations and then return either a single
result or multiple results. Array formulas act on two or more sets of values known
as array arguments. Each array argument must have the same number of rows and
columns.
Some of the built-in functions are array formulas, and must be entered as arrays
to get the correct results.
In the common MS- Excel implementation, the array formula is written in
braces:{}. For creating an array formula, the editor can be used in the same way
as for creating other formulas, except CTRL+SHIFT+ENTER had to be pressed
to enter the formula.
The set of values representing array arguments can contain either cell references
or array constants. Array constants can be used in place of references instead of
entering each constant value in a separate cell on the worksheet.

Array formula that produces single result

This type of array formula can simplify a worksheet model by replacing several different formulas with a single array formula.
Example 2.1: Lets have a worksheet to calculate the total value of stocks in a
warehouse that contains n=3 types of raw materials. The result is given by:
V alue =

n
X

(Quantityi P ricei )

(2.1)

i=

The non-array formula is a sum of products, as presented in Fig.2.1. The greater


is n the longer is the time to enter the formula. Moreover, there is a high possibility
of writing errors.

Fig. 2.1

Using the array formula, the operator has to use the SUM function and introduce
as arguments the two arrays of data: the Quantity and the Price. To validate the
formula, Ctrl+Shift+Enter is pressed. The appropriate array formula is presented
in Fig.2.2.

Fig. 2.2

Example 2.2: Lets have a worksheet to calculate the average absolute deviation
for the value of sales in a day & night store in the first decade of a month. For
n = 10 days, the result is given by:
n

Deviation =

1X
1X
|(Salesi
Salesi )|
n
n
i=1

(2.2)

i=1

The non array procedure calculates step by step: the average of sales, the deviation of each value to the average, the absolute value of each deviation and the
average absolute deviation. The worksheet is presented in Fig.2.3 and the formulas
are detailed in Fig.2.4.

Fig. 2.3

Fig. 2.4

The array formula needs as intermediary step only the average of sales, than
produces the average absolute deviation according to (2.2). The formula is presented
in Fig.2.5.

Fig. 2.5

Array formula that produces multiple result

This type of array formula either returns an array as result or uses arrays as arguments. To calculate multiple results with an array formula, the formula has to be
entered in the worksheet in an array that has the same number of rows and columns
as the array arguments have.
Example 3.1: Lets have a worksheet including a set of data y depending on x,
with a 2D representation as in Fig.3.1.

Fig. 3.1

To add a trendline means to find the line that bests approximates the cloud
of points. The TREND built-in function in MS-Excel calculates the points on the

trendline. It is an array formula having two array arguments: the known y and
the known x values. Introducing the formula in the range B5:I5 and adding the
trendline to the chart, gives the worksheet presented in Fig.3.2. To obtain the
explicit equation of the line, MS Excel includes the LINEST function that returns
the coefficients of the trend line as a linear regression. This is an array function too,
as presented in Fig.3.2.

Fig. 3.2

Example 3.2: Lets do some classic matrix operations with X (120x3) and Y
(120x1) as presented in Fig.3.3. MS-Excel has built-in functions for matrix operation: MINVERSE, MMULT, MDETERM, array formulas with array arguments.

Fig. 3.3

The array functions are used in the worksheet as follows:

H10 : J12
H18 : J20
L14
L22
N 10 : N 12
P 10 : P 12

{= M M U LT (H4 : DW 6; B4 : D123)}
{= M IN V ERSE(H10 : J12)}
{= M DET ERM (H10 : J12)}
{= M DET ERM (H18 : J20)}
{= M M U LT (H4 : DW 6; F 4 : F 123)}
{= M M U LT (H18 : J20; N 10 : N 12)}

Conclusion

The array formula is a special category in MS-Excel that facilitates multiple calculation and working with matrixes. These easy to use formulas simplify the worksheet,
burns intermediary steps and let the user to concentrate on the problem more than
on the calculus.

References
[1] Ganga M., Manual de Matematica, Elemente de Algebra liniara, si geometrie
analitic
a, clasa a XI-a,Ed., Mathpress, 2003
[2] Lupsor V.,Pop V., Matematica pentru grupele de performanta, Exercitii si probleme, Ed. Dacia, 2004
[3] M.Nagy, Solutii n Excel pentru economisti, Ed. Gutenberg, Arad, 2000
[4] M. Nagy, M. Vizental, Asistarea deciziei folosind mediul Excel, Ed. Albastra,
Cluj-Napoca, 2008
[5] Schmuller J., Statistical analysis with Excel for Dummies, Wiley Publishing Inc.,
2009.
Authors affiliation:
Mariana Nagy - Department of Mathematics and Computer Science, Faculty
of Exact Sciences, Aurel Vlaicu University of Arad, Romania
Nicolae M
argean - Colegiul National Elena Ghiba-Birta, Arad
Valentin Burc
a - SC Leoni Wiring Systems SRL Arad
Mihaiela Vizental - Department of Mathematics and Computer Science, Faculty of Exact Sciences, Aurel Vlaicu University of Arad, Romania
E-mails: mariana.nagy@uav.ro, burca valentin@yahoo.com,
margeann@gmail.com, mihavizental@yahoo.com, .

You might also like