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

S2 Dynamic Array Basics START

Uploaded by

Somashekar B
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

S2 Dynamic Array Basics START

Uploaded by

Somashekar B
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 24

Dynamic Arrays & Spill Behavior

Link Topic Comprehension


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

Raw Data Spilled array

Division Region Revenue


Utility North America 44,196
Utility South America 20,898
Utility Asia 46,994
Utility Europe 43,695
Utility Australia 34,196
Productivity North America 34,155
Productivity South America 24,396
Productivity Asia 29,276
Productivity Europe 45,540
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
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.

Raw Data as Table Spilled array (from Table)

Division Region Revenue


Utility North America 44,196
Utility South America 20,898
Utility Asia 46,994
Utility Europe 43,695
Utility Australia 34,196
Productivity North America 34,155
Productivity South America 24,396
Productivity Asia 29,276
Productivity Europe 45,540
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
Typing in =A6:C20 in G5 and pressing Enter gives
us a spilled array of all source cells. In this version we referenced a
Click anywhere inside the range and you see the bigger range. We can hide the
blue border where the "spill" has occurred. zeros with Custom number
formatting - highlight the
results range and type in #;-#;
in custom formatting.

xcel Table as the source


automatically expands as
the table.

lled array (from Table) Referencing a spilled array range


n we referenced a
. We can hide the
ustom number
highlight the
e and type in #;-#;
rmatting.
Filter (The New Power Lookup) INDEX

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

Division Region Revenue Region


Utility North America 44,196
Utility South America 20,898
Utility Asia 46,994
Utility Europe 43,695
Utility Australia 34,196
Productivity North America 34,155 Revenue greater than:
Productivity South America 24,396
Productivity Asia 29,276
Productivity Europe 45,540
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

Table as Source

Division Region Revenue Region


Utility North America 44,196
Utility South America 20,898
Utility Asia 46,994
Utility Europe 43,695
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
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
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
Utility South America 20,898
Utility Asia 46,994
Utility Europe 43,695
Utility Australia 34,196
Productivity North America 34,155
Productivity South America 24,396
Productivity Asia 29,276
Productivity Europe 45,540
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

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
Utility South America 20,898
Utility Asia 46,994
Utility Europe 43,695
Utility Australia 34,196
Productivity North America 34,155
Productivity South America 24,396
Productivity Asia 29,276
Productivity Europe 45,540
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

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


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

Revenue Division Region Revenue Division

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
by Region in ascending and Revenue in descending

Region Revenue
Game Game
Europe Australia
46,336 49,656
UNIQUE Function INDEX

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

Division Region Revenue Division


Utility North America 44,196
Utility South America 20,898
Utility Asia 46,994
Utility Europe 43,695
Utility Australia 34,196
Productivity North America 34,155
Productivity South America 24,396
Productivity Asia 29,276 Unique Count
Productivity Europe 45,540
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
Utility North America
Utility South America
Utility Asia Unique list of Division and Region
Utility Europe Division Region
Utility Australia
Productivity North America
Productivity South America
Productivity Asia
Productivity Europe
Productivity Australia
Game North America
Game South America
Game Asia
Game Europe
Game Australia
Health Europe
Productivity North America
Productivity Europe
Utility Asia
Utility South America
Unique list of Division - account for extra rows

Division

Unique Count

Division and Region


Combining Dynamic Array Functions INDEX

Revenue by division (sorted)


Division Region Revenue Revenue
Utility North America 44,196
Utility South America 20,898
Utility Asia 46,994
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
Productivity Europe 45,540
Productivity Australia 29,277
Game North America 44,675
Game South America 42,569 Divisions with revenue less than 30k & exclude empt
Game Asia 43,784
Game Europe 46,336
Game Australia 49,656
Get the total
revenue by division.

han 30k & exclude empty cells


SEQUENCE Function INDEX

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

Basic Demo of Sequence: Generate an index

Every 5 days from today One letter


RANDARRAY Function INDEX

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

Random numbers between 0 and 1 Randomly assign people to teams

Gary Miller Team 1


James Willard Team 1
Richard Elliot Team 1
Robert Spear Team 1
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
Stevie Bridge Team 3
Andre Cooper Team 3
Crystal Doyle Team 3
Robert Musser Team 4
Daniel Garrett Team 4
Ann Withers Team 4
Paul Hill Team 4
Randarray comes in
handy for modeling and
simulations
@ for Compatibility

Syntax of @(value)
Test this!
Write =@($C$8:$C$22) in E8 and drag it
This formula was created in Excel 2016 (pre Dynamic Array Excel) down.

Division Region Revenue @ Prefix


Utility North America 44,196
Utility South America 20,898
Utility Asia 46,994
Utility Europe 43,695
Utility Australia 34,196
Productivity North America 34,155
Productivity South America 24,396
Productivity Asia 29,276
Productivity Europe 45,540
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

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


Formula to find multiple match items fo
Dynamic-Array Excel - Click here if you'd
understand how the formula works.
Division Apps All Apps for Division:
Utility Accord 3 Productivity
Productivity Blend #NAME?
Game Fightrr #NAME? Test this!
Game Hackrr #NAME? Remove the @ prefix. Does anything chan
Game Kryptis #NAME? (Here you can safely remove the @ sign a
Utility Misty Wash #NAME? happens. Excel tries to be on the safe side
sign "just in case"). We cover compatibilit
Game Perino #NAME? next section.
Productivity Sleops #NAME?
Utility Twenty20
Productivity WenCaL
INDEX

Test this!
Write =@($C$8:$C$22) in E8 and drag it
down.

Division with 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)

Formula to find multiple match items for Pre-


Dynamic-Array Excel - Click here if you'd like to
understand how the formula works.

Test this!
Remove the @ prefix. Does anything change?
(Here you can safely remove the @ sign and nothing
happens. Excel tries to be on the safe side and adds the @
sign "just in case"). We cover compatibility in detail in the
next section.
Challenge: Create a Quick Overview Report INDEX

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


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

Date Sales Agent Quantity Sales Agent Quantity


1/1/2019 Stevie Bridge 5
1/5/2019 Ewan Thompson 6
1/9/2019 Richard Elliot 1
1/12/2019 Paul Hill 9
1/17/2019 Paul Garza 2
1/20/2019 Ewan Thompson 3
1/25/2019 Robert Musser 4
1/27/2019 Betina Bauer 9
1/28/2019 Paul Garza 10
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
FALSE
FALSE
✘ 1. Done FALSE
2. Done
3. Done WELL DONE!

You might also like