0% found this document useful (0 votes)
12 views

S2 Dynamic Array Basics

Uploaded by

Somashekar B
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

S2 Dynamic Array Basics

Uploaded by

Somashekar B
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 27

Dynamic Arrays & Spill Behavior

Link Topic Comprehension


Formulas Spill & Other Dynamic
Spill Done & Understood
Array Characteristics
FILTER Filter (The New Power Lookup) Done & Understood
SORT(BY) SORT Function & SORTBY Formula Done & Understood
UNIQUE UNIQUE Function Done & Understood
Combine Combining Dynamic Array functions Done & Understood
SEQUENCE SEQUENCE Function Done & Understood
RANDARRAY RANDARRAY Function Done & Understood
@ Prefix for Compatibility (Previously
@ Prefix Done & Understood
SINGLE)
Challenge: Create a Quick Overview
Challenge Done & Understood
Report
Your Notes

In middle if sum word/num already there


(=f6# to
table need to practice
Sortby

allocation

@
Formulas Spill & Other Dynamic Array Characteristics INDEX

Raw Data Spilled array

Division Region Revenue


Utility North America 44,196 Utility
Utility South America 20,898 Utility
Utility Asia 46,994 Utility
Utility Europe 43,695 Utility
Utility Australia 34,196 Utility
Productivity North America 34,155 Productivity
Productivity South America 24,396 Productivity
Productivity Asia 29,276 Productivity
Productivity Europe 45,540 Productivity
Productivity Australia 29,277 Productivity
Game North America 44,675 Game
Game South America 42,569 Game
Game Asia 43,784 Game
Game Europe 46,336 Game
Game Australia 49,656 Game

TRY THIS - Type new values after


the last row. See how the
different spilled arrays behave.
Raw Data as Table Spilled array (from Table)

Division Region Revenue


Utility North America 44,196 Utility
Utility South America 20,898 Utility
Utility Asia 46,994 Utility
Utility Europe 43,695 Utility
Utility Australia 34,196 Utility
Productivity North America 34,155 Productivity
Productivity South America 24,396 Productivity
Productivity Asia 29,276 Productivity
Productivity Europe 45,540 Productivity
Productivity Australia 29,277 Productivity
Game North America 44,675 Game
Game South America 42,569 Game
Game Asia 43,784 Game
Game Europe 46,336 Game
Game Australia 49,656 Game

The advantage to using an Ex


TRY THIS - Add a new line to data is that the spilled array a
table and see what happens new data rows are added to
to the Spilled array.
Typing in =A6:C20 in G5 and pressing Enter gives
us a spilled array of all source cells.
Click anywhere inside the range and you see the
blue border where the "spill" has occurred.

North America 44196 Utility North Amer 44196


South America 20898 Utility South Amer 20898
In this version we
Asia 46994 Utility Asia 46994 bigger range. We
Europe 43695 Utility Europe 43695 zeros with Custom
Australia 34196 Utility Australia 34196 formatting - highli
North America 34155 Productivity North Amer 34155 results range and
in custom formatti
South America 24396 Productivity South Amer 24396
Asia 29276 Productivity Asia 29276
Europe 45540 Productivity Europe 45540
Australia 29277 Productivity Australia 29277
North America 44675 Game North Amer 44675
South America 42569 Game South Amer 42569
Asia 43784 Game Asia 43784
Europe 46336 Game Europe 46336
Australia 49656 Game Australia 49656

lled array (from Table) Referencing a spilled array range

North America 44196 #NAME? #NAME? #NAME?


South America 20898 #NAME? #NAME? #NAME?
Asia 46994 #NAME? #NAME? #NAME?
Europe 43695 #NAME? #NAME? #NAME?
Australia 34196 #NAME? #NAME? #NAME?
North America 34155 #NAME? #NAME? #NAME?
South America 24396 #NAME? #NAME? #NAME?
Asia 29276 #NAME? #NAME? #NAME?
Europe 45540 #NAME? #NAME? #NAME?
Australia 29277 #NAME? #NAME? #NAME?
North America 44675 #NAME? #NAME? #NAME?
South America 42569 #NAME? #NAME? #NAME?
Asia 43784 #NAME? #NAME? #NAME?
Europe 46336 #NAME? #NAME? #NAME?
Australia 49656 #NAME? #NAME? #NAME?

The advantage to using an Excel Table as the source


data is that the spilled array automatically expands as
new data rows are added to the table.
In this version we referenced a
bigger range. We can hide the
zeros with Custom number
formatting - highlight the
results range and type in #;-#;
in custom formatting.
Filter (The New Power Lookup) INDEX

Syntax is FILTER(array, include, [if_empty])

Division Region Revenue Region North America


Utility North America 44,196
Utility South America 20,898 #NAME? #NAME?
Utility Asia 46,994 #NAME? #NAME?
Utility Europe 43,695 #NAME? #NAME?
Utility Australia 34,196
Productivity North America 34,155 Revenue greater than: 45,000
Productivity South America 24,396
Productivity Asia 29,276 #NAME? #NAME?
Productivity Europe 45,540 #NAME? #NAME?
Productivity Australia 29,277 #NAME? #NAME?
Game North America 44,675 #NAME? #NAME?
Game South America 42,569
Game Asia 43,784
Game Europe 46,336
Game Australia 49,656

Table as Source

Division Region Revenue Region Asia


Utility North America 44,196
Utility South America 20,898 #NAME? #NAME?
Utility Asia 46,994 #NAME? #NAME?
Utility Europe 43,695 #NAME? #NAME?
Utility Australia 34,196
Productivity North America 34,155
Productivity South America 24,396
Productivity Asia 29,276 Division Game
Productivity Europe 45,540 Region Europe
Productivity Australia 29,277
Game North America 44,675 #NAME? #NAME?
Game South America 42,569
Game Asia 43,784
Game Europe 46,336
Game Australia 49,656
Test this!
Try adding a new Division
on the bottom of the list.
Test this!
Try adding a new Division
on the bottom of the list.
Region Asia

#NAME? #NAME? #NAME? #NAME?


#NAME? #NAME? #NAME? #NAME?
#NAME? #NAME? #NAME? #NAME?

Revenue greater than: 45000

#NAME? #NAME? #NAME? #NAME?


#NAME? #NAME? #NAME? #NAME?
#NAME? #NAME? #NAME? #NAME?
#NAME? #NAME? #NAME? #NAME?

#NAME?
#NAME?
#NAME?

#NAME?

You will learn more about this


formula and how Excel operates
under the hood in later sections.
SORT Function & SORTBY Formula INDEX

Syntax is SORT(array, [sort index], [sort order], [by_col]) Sort by Revenue in descending order

Division Region Revenue Division Region


Utility North America 44,196 #NAME? #NAME?
Utility South America 20,898 #NAME? #NAME?
Utility Asia 46,994 #NAME? #NAME?
Utility Europe 43,695 #NAME? #NAME?
Utility Australia 34,196 #NAME? #NAME?
Productivity North America 34,155 #NAME? #NAME?
Productivity South America 24,396 #NAME? #NAME?
Productivity Asia 29,276 #NAME? #NAME?
Productivity Europe 45,540 #NAME? #NAME?
Productivity Australia 29,277 #NAME? #NAME?
Game North America 44,675 #NAME? #NAME?
Game South America 42,569 #NAME? #NAME?
Game Asia 43,784 #NAME? #NAME?
Game Europe 46,336 #NAME? #NAME?
Game Australia 49,656 #NAME? #NAME?

SORTBY Function
Syntax of SORTBY(array, by_array1, sort_order1…)
Sort by Revenue descending but only show division

Division Region Revenue Division Region


Utility North America 44,196 #NAME? #NAME?
Utility South America 20,898 #NAME? #NAME?
Utility Asia 46,994 #NAME? #NAME?
Utility Europe 43,695 #NAME? #NAME?
Utility Australia 34,196 #NAME? #NAME?
Productivity North America 34,155 #NAME? #NAME?
Productivity South America 24,396 #NAME? #NAME?
Productivity Asia 29,276 #NAME? #NAME?
Productivity Europe 45,540 #NAME? #NAME?
Productivity Australia 29,277 #NAME? #NAME?
Game North America 44,675 #NAME? #NAME?
Game South America 42,569 #NAME? #NAME?
Game Asia 43,784 #NAME? #NAME?
Game Europe 46,336 #NAME? #NAME?
Game Australia 49,656 #NAME? #NAME?

Test this!
Try adding a new Division
on the bottom of the list.
Test this!
Try adding a new Division
on the bottom of the list.

SORT by Column

Division Utility Utility Utility Utility Utility Productivity


Region North America South AmericAsia Europe Australia North America
Revenue 44,196 20,898 46,994 43,695 34,196 34,155

Sort by Revenue in descending order


#NAME? #NAME? #NAME? #NAME? #NAME? #NAME?
#NAME? #NAME? #NAME? #NAME? #NAME? #NAME?
#NAME? #NAME? #NAME? #NAME? #NAME? #NAME?
You will learn about Array syntax in
Array Logic & Array Constants Section.

cending order Sort by Division then Region Sort by Region in ascending and Revenue in

Revenue Division Region Revenue Division


#NAME? #NAME? #NAME? #NAME? #NAME?
#NAME? #NAME? #NAME? #NAME? #NAME?
#NAME? #NAME? #NAME? #NAME? #NAME?
#NAME? #NAME? #NAME? #NAME? #NAME?
#NAME? #NAME? #NAME? #NAME? #NAME?
#NAME? #NAME? #NAME? #NAME? #NAME?
#NAME? #NAME? #NAME? #NAME? #NAME?
#NAME? #NAME? #NAME? #NAME? #NAME?
#NAME? #NAME? #NAME? #NAME? #NAME?
#NAME? #NAME? #NAME? #NAME? #NAME?
#NAME? #NAME? #NAME? #NAME? #NAME?
#NAME? #NAME? #NAME? #NAME? #NAME?
#NAME? #NAME? #NAME? #NAME? #NAME?
#NAME? #NAME? #NAME? #NAME? #NAME?
#NAME? #NAME? #NAME? #NAME? #NAME?

nding but only show division and region


ProductivitProductivitProductivity Productivity Game Game Game
South AmerAsia Europe Australia North AmerSouth AmerAsia
24,396 29,276 45,540 29,277 44,675 42,569 43,784

#NAME? #NAME? #NAME? #NAME? #NAME? #NAME? #NAME?


#NAME? #NAME? #NAME? #NAME? #NAME? #NAME? #NAME?
#NAME? #NAME? #NAME? #NAME? #NAME? #NAME? #NAME?
by Region in ascending and Revenue in descending

Region Revenue Division Region Revenue


#NAME? #NAME? #NAME? #NAME? #NAME?
#NAME? #NAME? #NAME? #NAME? #NAME?
#NAME? #NAME? #NAME? #NAME? #NAME?
#NAME? #NAME? #NAME? #NAME? #NAME?
#NAME? #NAME? #NAME? #NAME? #NAME?
#NAME? #NAME? #NAME? #NAME? #NAME?
#NAME? #NAME? #NAME? #NAME? #NAME?
#NAME? #NAME? #NAME? #NAME? #NAME?
#NAME? #NAME? #NAME? #NAME? #NAME?
#NAME? #NAME? #NAME? #NAME? #NAME?
#NAME? #NAME? #NAME? #NAME? #NAME?
#NAME? #NAME? #NAME? #NAME? #NAME?
#NAME? #NAME? #NAME? #NAME? #NAME?
#NAME? #NAME? #NAME? #NAME? #NAME?
#NAME? #NAME? #NAME? #NAME? #NAME?
Game Game
Europe Australia
46,336 49,656

#NAME? #NAME?
#NAME? #NAME?
#NAME? #NAME?
sortby
Division Region
#NAME? #NAME?
#NAME? #NAME?
#NAME? #NAME?
#NAME? #NAME?
#NAME? #NAME?
#NAME? #NAME?
#NAME? #NAME?
#NAME? #NAME?
#NAME? #NAME?
#NAME? #NAME?
#NAME? #NAME?
#NAME? #NAME?
#NAME? #NAME?
#NAME? #NAME?
#NAME? #NAME?
#NAME? #NAME?
UNIQUE Function INDEX

Syntax of UNIQUE(array, [by_col], [occurs_once]) Unique list of Division

Division Region Revenue Division


Utility North America 44,196 #NAME?
Utility South America 20,898 #NAME?
Utility Asia 46,994 #NAME?
Utility Europe 43,695 #NAME?
Utility Australia 34,196
Productivity North America 34,155
Productivity South America 24,396
Productivity Asia 29,276 Unique Count
Productivity Europe 45,540 1
Productivity Australia 29,277
Game North America 44,675
Game South America 42,569
Game Asia 43,784
Game Europe 46,336
Game Australia 49,656
Health Europe 25,000

Distinct List of Division


Division Region #NAME?
Utility North America
Utility South America
Utility Asia Unique list of Division and Region
Utility Europe Division Region
Utility Australia #NAME? #NAME?
Productivity North America #NAME? #NAME?
Productivity South America #NAME? #NAME?
Productivity Asia #NAME? #NAME?
Productivity Europe #NAME? #NAME?
Productivity Australia #NAME? #NAME?
Game North America #NAME? #NAME?
Game South America #NAME? #NAME?
Game Asia #NAME? #NAME?
Game Europe #NAME? #NAME?
Game Australia #NAME? #NAME?
Health Europe #NAME? #NAME?
Productivity North America #NAME? #NAME?
Productivity Europe #NAME? #NAME?
Utility Asia #NAME? #NAME?
Utility South America #NAME? #NAME?
Unique list of Division - account for extra rows

Division Division Division


#NAME? #NAME? #NAME?
#NAME? #NAME? #NAME?
#NAME? #NAME? #NAME?
#NAME? #NAME? #NAME?

Unique Count
1

Division and Region


Combining Dynamic Array Functions INDEX

Revenue by division (sorted)


Division Region Revenue Revenue
Utility North America 44,196 #NAME? #NAME?
Utility South America 20,898 #NAME? #NAME?
Utility Asia 46,994 #NAME? #NAME?
Utility Europe 43,695
Utility Australia 34,196
Productivity North America 34,155 Divisions with revenue less than 30k
Productivity South America 24,396
Productivity Asia 29,276 #NAME?
Productivity Europe 45,540 #NAME?
Productivity Australia 29,277
Game North America 44,675
Game South America 42,569 Divisions with revenue less than 30k & exclude empty ce
Game Asia 43,784
Game Europe 46,336 #NAME? Learn more about this an
Game Australia 49,656 #NAME? take advantage of the FIL
in the upcoming sections
understanding Excel's Bo
key here!
han 30k & exclude empty cells

Learn more about this and ways to


take advantage of the FILTER function
in the upcoming sections -
understanding Excel's Boolean Logic is
key here!
SEQUENCE Function INDEX

Syntax of SEQUENCE(rows, [columns], [start], [step])

Basic Demo of Sequence: Generate an index

#NAME? #NAME? #NAME? #NAME? #NAME? #NAME?


#NAME?
#NAME? #NAME? #NAME? #NAME? #NAME? #NAME?
#NAME?
#NAME?

Every 5 days from today One letter

#NAME? #NAME? #NAME?


#NAME? #NAME? #NAME?
#NAME? #NAME? #NAME?
#NAME? #NAME? #NAME?
#NAME? #NAME? #NAME?
#NAME? #NAME? #NAME?
#NAME? #NAME? #NAME?
#NAME? #NAME? #NAME?
#NAME? #NAME? #NAME?
#NAME? #NAME? #NAME?
RANDARRAY Function INDEX

Syntax of RANDARRAY([rows], [columns], [min], [max], [integer])

Random numbers between 0 and 1 Randomly assign people to teams

#NAME? #NAME? Gary Miller Team 1


#NAME? #NAME? James Willard Team 1
#NAME? #NAME? Richard Elliot Team 1
#NAME? #NAME? Robert Spear Team 1
#NAME? #NAME? Roger Mun Team 2
Paul Garza Team 2
Robert Marquez Team 2
Random rounded numbers between 10 and 100 Natalie Porter Team 2
Kim West Team 3
#NAME? #NAME? Stevie Bridge Team 3
#NAME? #NAME? Andre Cooper Team 3
#NAME? #NAME? Crystal Doyle Team 3
#NAME? #NAME? Robert Musser Team 4
#NAME? #NAME? Daniel Garrett Team 4
Ann Withers Team 4
Paul Hill Team 4
Randarray comes in
handy for modeling and
simulations Test this!
Press F9 to change
the sort order
#NAME?
#NAME?
#NAME?
#NAME?
#NAME?
#NAME?
#NAME?
#NAME?
#NAME?
#NAME?
#NAME?
#NAME?
#NAME?
#NAME?
#NAME?
#NAME?

his!
F9 to change
rt order
@ for Compatibility INDEX

Syntax of @(value)

Division Region Revenue @ Prefix Division with highest Revenue


Utility North America 44,196 44,196 Game
Utility South America 20,898 20,898
Utility Asia 46,994 46,994
Utility Europe 43,695 43,695
Utility Australia 34,196 34,196
Productivity North America 34,155 34,155
Productivity South America 24,396 24,396
Productivity Asia 29,276 29,276
Productivity Europe 45,540 45,540
Productivity Australia 29,277 29,277
Game North America 44,675 44,675
Game South America 42,569 42,569
Game Asia 43,784 43,784
Game Europe 46,336 46,336
Game Australia 49,656 49,656

Older formulas might get the @ Prefix if opened in DA Excel

Formula to find multiple match items for Pre-


Division Apps All Apps for Division: Dynamic-Array Excel - Click here if you'd like to
Utility Accord 3 Productivity understand how the formula works.
Productivity Blend #NAME?
Game Fightrr #NAME?
Game Hackrr #NAME?
Game Kryptis #NAME? Test this!
Utility Misty Wash #NAME? Remove the @ prefix. Does anything change?
(Here you can safely remove the @ sign and noth
Game Perino #NAME? happens. Excel tries to be on the safe side and ad
Productivity Sleops #NAME? sign "just in case"). We cover compatibility in det
Utility Twenty20 next section.
Productivity WenCaL
highest Revenue

You can also use it if you


don't want your formula
to spill.

@ prefix is mainly for compatibility


purposes. It generates implicit
intersection and avoids formulas from
spilling (more on implicit intersection
in the advanced to expert section)

tiple match items for Pre-


- Click here if you'd like to
formula works.

Does anything change?


emove the @ sign and nothing
o be on the safe side and adds the @
e cover compatibility in detail in the
Challenge: Create a Quick Overview Report INDEX

1 Convert the data to a table. Name the table TableAgent


2 Create a unique list of sales agents sorted in descending order
3 Calculate the total quantity sold by each agent during the entire period

Date Sales Agent Quantity Sales Agent Quantity


1/1/2019 Stevie Bridge 5 #NAME? #NAME?
1/5/2019 Ewan Thompson 6 #NAME? #NAME?
1/9/2019 Richard Elliot 1 #NAME? #NAME?
1/12/2019 Paul Hill 9 #NAME? #NAME?
1/17/2019 Paul Garza 2 #NAME? #NAME?
1/20/2019 Ewan Thompson 3 #NAME? #NAME?
1/25/2019 Robert Musser 4 #NAME? #NAME?
1/27/2019 Betina Bauer 9 #NAME? #NAME?
1/28/2019 Paul Garza 10 #NAME? #NAME?
2/2/2019 Peter Ramsy 7
2/5/2019 Betina Bauer 10
2/9/2019 Paul Hill 8
2/13/2019 Paul Garza 10
2/19/2019 Stevie Bridge 4
2/24/2019 Stevie Bridge 9
3/1/2019 Robert Musser 8
3/6/2019 Peter Ramsy 3
3/8/2019 Peter Ramsy 10
3/9/2019 Peter Ramsy 4
3/10/2019 Brigitte Bond 4
3/15/2019 Betina Bauer 5
3/17/2019 Ewan Thompson 8
3/23/2019 Paul Garza 8
3/25/2019 Stevie Bridge 8
3/29/2019 Richard Elliot 10
4/3/2019 Richard Elliot 3
4/6/2019 Richard Elliot 8
4/8/2019 Stevie Bridge 11
4/10/2019 Betina Bauer 10
4/15/2019 Brigitte Bond 9
4/16/2019 Richard Elliot 11
4/22/2019 Peter Ramsy 8
4/26/2019 Betina Bauer 7
4/27/2019 Ewan Thompson 8
4/29/2019 Ewan Thompson 7
5/5/2019 Ewan Thompson 6
5/6/2019 Richard Elliot 9
5/11/2019 Paul Garza 9
5/12/2019 Paul Garza 8
5/16/2019 Brigitte Bond 11
5/19/2019 Ewan Thompson 5
5/24/2019 Richard Elliot 6
5/30/2019 Paul Garza 8
6/2/2019 Richard Elliot 8
6/6/2019 Brigitte Bond 9
6/9/2019 Richard Elliot 7
6/10/2019 Peter Ramsy 3
6/14/2019 Robert Musser 8
6/18/2019 Paul Garza 10
TRUE
TRUE
✘ 1. Done
TRUE
✘ 2. Done
✘ 3. Done WELL DONE!

Sales Agent Quantity


#NAME? #NAME? Sorted by Quantity
#NAME? #NAME?
#NAME? #NAME?
#NAME? #NAME?
#NAME? #NAME?
#NAME? #NAME?
#NAME? #NAME?
#NAME? #NAME?
#NAME? #NAME?

You might also like