Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 10

Excel Introduction to Arrays

- Rakesh Santhapur
Excel range calculations
(often called array functions)

Normally, you think about calculations in terms of


working with two single cells
But often in spreadsheet work, you have calculations
that span entire ranges
Such are called array type calculations
To signal to Excel that your calculation is an array type
calculation, it use CTRL-SHIFT-RETURN instead of just
hitting the RETURN key
Array calculations can involve standard functions:
e.g: SUM, PRODUCT, IF
there are also specific Excel array functions:
=FREQUENCY()
Excel range calculations
array functions

Example: Compute total sales


where month is Jan and
region is North

Array function: when you enter this formula, use


Ctrl+Shift+Enter
=SUM((A2:A10="Jan") * (B2:B10="North") * C2:C10)

Multiplying 0 and 1 values


Excel range calculations
array functions

Question 1: Compute total sales


where month is Jan and
region is not North

Question 2: Count the number of sales months where month is


Jan and region is not North

Question 3: Compute total sales that are between 300 and 400
Excel range calculations
array functions

Question 1: Compute total sales


where month is Jan and
region is not North
Array function:
{=SUM((A2:A10="Jan") * (B2:B10<>"North") * C2:C10)}

Question 2: Count the number of sales months where month is


Jan and region is not North
{=SUM((A2:A10="Jan") * (B2:B10<>"North)) }

Question 3: Compute total sales that are between 300 and 400.
Array function:
{=SUM((C2:C10>=300)*(C2:C10<=400)*(C2:C10))}
Using Arrays Find the Current Rate in each
Store
Using Arrays Find the Current Rate in each
Store

Answer:

{=IFERROR(LOOKUP(2,1/($D3:$L3<>""),$D3:$L3),"-")}
Solving Simultaneous Linear Equations

Suppose you have the following equations


Solving Simultaneous Linear Equations

Suppose you have the following equations

we need to first formulate into a matrix equation

and the solution is then given by


Solving Simultaneous Linear Equations

We need to use 3 concepts here

Matrix Multiplication MMULT


Matrix Inverse MINVERSE
Arrays

Steps:
Setup the range for A, B and name the arrays as A and B
Select the range for s, then enter the formula:
=MMULT(MINVERSE(A),b) and press [CTRL Shift ENTER]

You might also like