Array Formula Notes
Array Formula Notes
Table of Contents
Array............................................................................................................................................... 2
Types of Calculations....................................................................................................................... 2
Definition of Array Formulas............................................................................................................ 2
Ctrl + Shift + Enter......................................................................................................................... 3
These Built-in Excel function arguments can NEVER perform array calculations:...........................3
Why We Need Array Formulas (How They Are Useful).....................................................................4
Drawbacks to Array Formulas......................................................................................................... 4
Types of Array Operators................................................................................................................. 5
Size & Shape of Arrays For Array Operation, How Array Operations Evaluate & What Resultant
Arrays Look Like.............................................................................................................................. 6
Array Constants.............................................................................................................................. 7
Array Functions............................................................................................................................... 8
Cliff Notes for Array Formulas....................................................................................................... 11
Cumulative List of Keyboards Throughout Class:..........................................................................12
Page 1 of 16
Array
1) Define Array: Two or more items.
Types of Calculations
1) Aggregate Calculations:
Calculations that take two or more items and calculate a single answer such
as adding a column of numbers.
2) Array Calculations:
Calculations that operate on an array of items rather than single items and
which deliver an array of answers called a "Resultant Array".
Resulta
nt
Array
Page 3 of 16
Page 5 of 16
Page 6 of 16
Page 7 of 16
Size & Shape of Arrays For Array Operation, How Array Operations Evaluate & What Resultant Arrays
Look Like
Full Picture:
Close Up:
Note: If you are multiplying row x row or column x column or table x table (same thing times same thing) the dimensions of the
arrays must be the same.
Page 8 of 16
Page 9 of 16
Array Constants
1) Array constants are formula elements that allow you to hard code an array of
items into a formula.
1. Example of Array Constants:
{1,2,3}
{0,"Below Par";3000,"Par";6000,"Excellent"}
2. Syntax for Array Constants:
Curly Brackets house the array: { }
Comma means column ,
Semi-colon means row :
3. Examples of Array Constants in Formulas:
=SUM(LARGE(B10:B14,{1,2,3}))
1. This is an Array Formula because the Array Constant
{1,2,3} in the k argument of LARGE instructs LARGE to
deliver 3 numbers.
2. This Array Formula does not need Ctrl + Shift + Enter
because there is no Array Operation that generates the
array, it is a hard coded array (Array Constant).
=VLOOKUP(C51,{0,"Below
Par";3000,"Par";6000,"Excellent"},2)
3. This is not an Array Formula because the Array Constant
represents a lookup table in the table_array argument in
VLOOKUP. Different from the Array Constant {1,2,3} in the
k argument of LARGE, which instructs LARGE to deliver 3
numbers, the Array Constant {0,"Below
Par";3000,"Par";6000,"Excellent"} does not instruct
VLOOKUP to deliver multiple items, but rather it is just the
table that VLOOKUP chooses a single value from.
4. If the arrays being used in the Array Calculation are Array Constants,
Ctrl + Shift + Enter is NOT required when you are entering the Array
Formula into a single cell.
i. Examples:
1. Ctrl + Shift + Enter NOT Required:
=SUM(LARGE(B10:B14,{1,2,3}))
or
=SUM({1,2,3}*{4;4;4})
2. This formula requires Ctrl + Shift + Enter because you are
entering the Array Function into multiple cells
simultaneously:
=FREQUENCY(A311:A323,{250;500;750;1000})
Page 10 of 16
Array Functions
1) Array Functions are a specific type of array formula that consist of a group of built-in
Excel functions that are programed to make array calculations and deliver a
resultant array of values that can be entered into a range of cells using the
keystrokes Ctrl + Shift + Enter.
2) Array Functions in Excel:
TRANSPOSE
Converts a vertical array or range into a horizontal array or range or
vice versa. Works on one-way or two-way arrays or ranges.
MODE.MULT (new in Excel 2010)
Calculates mode (statistics). Finds the number that occurs most
frequently when there are multiple such values (multiple modes).
FREQUENCY
Counts how many values are in each category, given the upper values
for each category.
TREND
Using the least-squares method for best-fitting data to a straight line,
returns an array of y values, given these formula inputs: known y
values, known x values, and an array of x values used to estimate the
array of y values.
LINEST
A function that simultaneously returns multiple statistics for single or
multiple regression, using the least-squares method for best-fitting
data to a straight line.
MMULT
Returns the matrix product of two arrays.
MUNIT (new in Excel 2013)
Returns the unit matrix, given a single number.
MINVERSE
Returns the inverse matrix, given a matrix.
3) For an Array Function to show the correct number of answers, you must anticipate
the size of the Resultant Array and highlight a range of cells that is the same size as
the Resultant Array BEFORE you type out the Array Function formula.
4) After you enter an Array Function with Ctrl + Shift + Enter, you cannot delete the
contents of just one cell. If you want to delete the contents of a cell, you must
delete all the contents of all the cells in the array.
5) Note: Although you must use the keystrokes Ctrl + Shift + Enter to enter an Array
Function into a range of cells, if you nest the Array Function inside an aggregate
function (like SUM, COUNT, MAX, or others) you do not have to use the keystrokes
Ctrl + Shift + Enter. The one exception seems to be if you put TRANSPOSE into
SUMPRODUCT.
Page 11 of 16
6) Example of TRANSPOSE:
We need to go from this:
To this:
Steps:
1. Count Rows and Columns = 2 x 4
2. Highlight range that is 4 x 2 (rows and columns)
3. Use Array Function TRANSPOSE and highlight range A282:D283 to
create formula: =TRANSPOSE(A282:D283)
4. Must use Ctrl + Shift + Enter because we are entering an array into
multiple cells simultaneously.
Picture:
7) Example of FREQUENCY:
Page 12 of 16
8) Notes for FREQUENCY (not required for this class, but is required for BI 348
class):
HereswhatyouneedtoknowabouthowtheFREQUENCYarrayfunctionworks:
FREQUENCYcountshowmanynumbersareineachcategory.
Thebins_arrayargumentcontainstheuppervaluesforthecategoriesnumbers
only.
Thedata_arrayargumentcontainsthevaluestocountnumbersonly.
Keepinmindthefollowingaboutcategories:
1) Categoriesareautomaticallycreated.Thereisnovisualindicationof
howthecategoriesareorganized.
2) Thefirstcategorycountsallthevalueslessthanorequaltothe
firstupperlimit.
3) Themiddlecategoriescountbetweenalowerlimitandanupperlimit.
Thelowerlimitisnotincludedinthecategory.Theupperlimitis
includedinthecategory.
4) Thelastcategorycatchesallthevaluesthataregreaterthanthe
lastupperlimit.
5) Thereisalwaysonemorecategorythantherearebins.
FREQUENCYdeliversaverticalarray.Ifyouneedahorizontalarray,usethe
TRANSPOSEfunctiontoconvertaverticalarraytoahorizontalarray.
MustuseCtrl+Shift+Enter
FREQUENCYignoresemptycellsandtext.
Ifthereareduplicatebins,theduplicatesgetacountofzero.(Youusethis
aspectutilizedwhenyoucreateformulasforuniquecounting.)
Page 13 of 16
Page 14 of 16
i. A1 = Relative
ii. $A$1 = Absolute or Locked
iii. A$1 = Mixed with Row Locked (Relative as you copy across the columns AND
Locked as you copy down the rows)
iv. $A1 = Mixed with Column Locked (Relative as you copy down the rows AND Locked
as you across the columns)
33)
Ctrl + Shift + 4 = Apply Currency Number Formatting
34)
Tab key = When you are selecting a Function from the Function Drop-down list, you
can select the function that is highlighted in blue by using the Tab key.
35)
F9 Key = To evaluate just a single part of formula while you are in edit mode,
highlight part of formula and hit the F9 key.
i. If you are creating an Array Constant in your formula: Hit F9.
ii. If you are evaluating the formula element just to see what that part of the formula
looks like, REMEMBER: to Undo with Ctrl + Z.
36)
Alt, E, A, A = Clear All (Content and Formatting)
37)
Evaluate Formula One Step at a Time Keyboard: Alt, M, V
38)
Keyboard to open Sort dialog box: Alt, D, S
39)
Ctrl + Shift + L = Filter (or Alt, D, F, F) = Toggle key for Filter Drop-down Arrows
40)
Ctrl + N = Open New File
41)
F12 = Save As (Change File Name, Location, File Type)
42)
Import Excel Table into Power Query Editor: Alt, A, P, T
43)
Ctrl + 1 (When Chart element in selected): Open Task Pane for Chart Element
44)
F4 Key = If you are in Edit mode while making a formula AND your cursor is
touching a particular Cell Reference, F4 key will toggle through the different Cell
References:
i. A1 = Relative
ii. $A$1 = Absolute or Locked
iii. A$1 = Mixed with Row Locked (Relative as you copy across the columns AND
Locked as you copy down the rows)
iv. $A1 = Mixed with Column Locked (Relative as you copy down the rows AND Locked
as you across the columns)
45)
46)
47)
48)
49)
50)
51)
Page 16 of 16