You are on page 1of 14

Excel Array Formulas

Excel array formulas allow you to write


concise formulas that perform operations that
might not be included as Excel built-in functions.

This workbook contains several examples of using


array formulas.
Operation Examples

Multiply all elements of an array constant by 2.


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

Use the SQRT function on a 5-value array constant.


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

Use the SQRT function on a range of 5 values.


1 2 3 4 5 -the range
Err:522 Err:522 Err:522 Err:522 Err:522 -the result
Example: Using an array formula
to eliminate intermediate formulas
Product Units Sold Unit Price Normal Calcs
Widgets 3 $50 $150
Ridgets 10 $100 $1,000
Lidgets 5 $20 $100
Kidgets 9 $10 $90
Fidgets 3 $60 $180
Zidgets 1 $200 $200

$1,720 -SUM formula

$1,720 -a single array formula that can replace


the SUM formula and the six
formulas in D4:D9.
ula that can replace
Conditional Sum Example with an Array
Find the total of sales made by salesperson Smith.
Name Sale
Smith $880 Excel built-in function: The SumIF method
Jones $350 $1,896
Wicket $441
Pickford $280
Aguila $385 The array formula method
Fortes $281 $1,896
Jordan $300
Michard $250
Smith $201
Willard $398
Ellis $440
Smith $595
Pickford $560
Smith $220

Another method: A Pivot Table


Sum - Sale
Name
Smith $1,896
An array formula: Calculate a single result
Use array formulas to find the average revenue for all divisions in both sales areas.

2000
Electronics
Europe 161,000
NA 198,200

Motors
Europe 35,000
NA 60,000
Add this new data into the mix.
Acoustics The array formula handles it.
Europe 160,700 The average function doesn't.
NA 190,100

Studio
Europe 153,900
NA 190,700

Array formula Using the AVERAGE Function


Average Europe 158,533 158,533
Average NA 193,000 193,000
oth sales areas.
An array formula: SUM plus SMALL
Use an array formula to sum the three smallest values in a range.

Sum the 3 smallest values in a range


12
-5
3 Sum of smallest: #NAME?
2
18
4
5
25 Note:
15 The syntax of the SMALL function is =SMALL(array,k) w
7 is a range of numerical data for which you want to find
99 The formula uses an array constant as the 2 nd argument
23 This generates a new array that consists of the three s
6 This array is then passed to the SUM function, and it r
14 in the new array; in this example, -3. This is the proce
28 Step 1. Excel evaluates the SMALL function using a seco
0 Step 2. Excel evaluates the SMALL function using a seco
6 Step 3. Excel evaluates the SMALL function using a seco
13 Step 4. Excel sums together –5, 0, and 2 and returns –3.
7
4
8
LL function is =SMALL(array,k) where array
data for which you want to find the kth smallest value.
ay constant as the 2nd argument for the SMALL function.
rray that consists of the three smallest values in the range.
ed to the SUM function, and it returns the sum of the values
s example, -3. This is the processing Excel goes through:
he SMALL function using a second argument of 1. It returns –5.
he SMALL function using a second argument of 2. It returns 0.
he SMALL function using a second argument of 3. It returns 2.
her –5, 0, and 2 and returns –3.
Example: SUM and Nested Ifs in an Array Formula
Find the sum of sales for a particular state and a particular beer type.

Oregon, Amber Ale: $4,758,779


California, Pale Ale: $6,684,042
Washington, Porter: $4,939,958

Season Year Type State Sales $


Fall 1998 Amber Ale California $554,536
Fall 1998 Hefeweizen California $540,643
Fall 1998 Pale Ale California $577,548
Fall 1998 Pilsner California $455,905
Fall 1998 Porter California $490,871
Fall 1998 Stout California $446,383
Fall 1998 Amber Ale Oregon $457,726
Fall 1998 Hefeweizen Oregon $347,696
Fall 1998 Pale Ale Oregon $384,541
Fall 1998 Pilsner Oregon $386,420
Fall 1998 Porter Oregon $370,970
Fall 1998 Stout Oregon $430,754
Fall 1998 Amber Ale Washington $500,847
Fall 1998 Hefeweizen Washington $507,070
Fall 1998 Pale Ale Washington $482,346
Fall 1998 Pilsner Washington $608,713
Fall 1998 Porter Washington $150,000
Fall 1998 Stout Washington $500,649
Spring 1998 Amber Ale California $545,780
Spring 1998 Hefeweizen California $440,644
Spring 1998 Pale Ale California $580,359
Spring 1998 Pilsner California $536,225
Spring 1998 Porter California $414,908
Spring 1998 Stout California $377,997
Spring 1998 Amber Ale Oregon $331,289
Spring 1998 Hefeweizen Oregon $384,572
Spring 1998 Pale Ale Oregon $365,813
Spring 1998 Pilsner Oregon $396,338
Spring 1998 Porter Oregon $453,761
Spring 1998 Stout Oregon $356,538
Spring 1998 Amber Ale Washington $606,332
Spring 1998 Hefeweizen Washington $535,218
Spring 1998 Pale Ale Washington $493,364
Spring 1998 Pilsner Washington $559,100
Spring 1998 Porter Washington $220,350
Spring 1998 Stout Washington $476,975
Summer 1998 Amber Ale California $545,621
Summer 1998 Hefeweizen California $489,255
Summer 1998 Pale Ale California $523,124
Summer 1998 Pilsner California $612,216
Summer 1998 Porter California $425,562
Summer 1998 Stout California $485,285
Summer 1998 Amber Ale Oregon $467,173
Summer 1998 Hefeweizen Oregon $447,637
Summer 1998 Pale Ale Oregon $407,542
Summer 1998 Pilsner Oregon $449,575
Summer 1998 Porter Oregon $403,248
Summer 1998 Stout Oregon $449,293
Summer 1998 Amber Ale Washington $493,845
Summer 1998 Hefeweizen Washington $523,464
Summer 1998 Pale Ale Washington $575,692
Summer 1998 Pilsner Washington $568,633
Summer 1998 Porter Washington $100,250
Summer 1998 Stout Washington $487,012
Winter 1998 Amber Ale California $519,177
Winter 1998 Hefeweizen California $488,597
Winter 1998 Pale Ale California $456,653
Winter 1998 Pilsner California $528,843
Winter 1998 Porter California $420,782
Winter 1998 Stout California $439,751
Winter 1998 Amber Ale Oregon $348,503
Winter 1998 Hefeweizen Oregon $352,086
Winter 1998 Pale Ale Oregon $336,824
Winter 1998 Pilsner Oregon $350,924
Winter 1998 Porter Oregon $338,334
Winter 1998 Stout Oregon $383,738
Winter 1998 Amber Ale Washington $508,939
Winter 1998 Hefeweizen Washington $393,294
Winter 1998 Pale Ale Washington $430,380
Winter 1998 Pilsner Washington $390,741
Winter 1998 Porter Washington $118,030
Winter 1998 Stout Washington $522,282
Fall 1999 Amber Ale California $514,649
Fall 1999 Hefeweizen California $498,673
Fall 1999 Pale Ale California $541,930
Fall 1999 Pilsner California $541,022
Fall 1999 Porter California $487,516
Fall 1999 Stout California $558,787
Fall 1999 Amber Ale Oregon $393,690
Fall 1999 Hefeweizen Oregon $427,784
Fall 1999 Pale Ale Oregon $386,772
Fall 1999 Pilsner Oregon $430,461
Fall 1999 Porter Oregon $481,311
Fall 1999 Stout Oregon $529,637
Fall 1999 Amber Ale Washington $596,707
Fall 1999 Hefeweizen Washington $541,275
Fall 1999 Pale Ale Washington $574,091
Fall 1999 Pilsner Washington $567,246
Fall 1999 Porter Washington $530,193
Fall 1999 Stout Washington $475,884
Spring 1999 Amber Ale California $533,691
Spring 1999 Hefeweizen California $534,352
Spring 1999 Pale Ale California $588,845
Spring 1999 Pilsner California $513,750
Spring 1999 Porter California $516,692
Spring 1999 Stout California $539,883
Spring 1999 Amber Ale Oregon $418,483
Spring 1999 Hefeweizen Oregon $452,955
Spring 1999 Pale Ale Oregon $432,909
Spring 1999 Pilsner Oregon $493,853
Spring 1999 Porter Oregon $393,368
Spring 1999 Stout Oregon $405,946
Spring 1999 Amber Ale Washington $561,874
Spring 1999 Hefeweizen Washington $544,747
Spring 1999 Pale Ale Washington $470,339
Spring 1999 Pilsner Washington $530,410
Spring 1999 Porter Washington $455,378
Spring 1999 Stout Washington $668,180
Summer 1999 Amber Ale California $597,626
Summer 1999 Hefeweizen California $612,909
Summer 1999 Pale Ale California $585,669
Summer 1999 Pilsner California $641,282
Summer 1999 Porter California $447,013
Summer 1999 Stout California $476,238
Summer 1999 Amber Ale Oregon $421,466
Summer 1999 Hefeweizen Oregon $427,983
Summer 1999 Pale Ale Oregon $429,498
Summer 1999 Pilsner Oregon $544,597
Summer 1999 Porter Oregon $446,014
Summer 1999 Stout Oregon $487,611
Summer 1999 Amber Ale Washington $565,106
Summer 1999 Hefeweizen Washington $567,487
Summer 1999 Pale Ale Washington $538,648
Summer 1999 Pilsner Washington $708,608
Summer 1999 Porter Washington $634,104
Summer 1999 Stout Washington $522,179
Winter 1999 Amber Ale California $511,406
Winter 1999 Hefeweizen California $487,020
Winter 1999 Pale Ale California $563,504
Winter 1999 Pilsner California $565,428
Winter 1999 Porter California $380,743
Winter 1999 Stout California $351,971
Winter 1999 Amber Ale Oregon $388,646
Winter 1999 Hefeweizen Oregon $337,401
Winter 1999 Pale Ale Oregon $441,713
Winter 1999 Pilsner Oregon $438,764
Winter 1999 Porter Oregon $378,201
Winter 1999 Stout Oregon $413,519
Winter 1999 Amber Ale Washington $516,512
Winter 1999 Hefeweizen Washington $494,282
Winter 1999 Pale Ale Washington $538,958
Winter 1999 Pilsner Washington $502,214
Winter 1999 Porter Washington $539,525
Winter 1999 Stout Washington $517,806
Fall 2000 Amber Ale California $625,097
Fall 2000 Hefeweizen California $632,542
Fall 2000 Pale Ale California $565,957
Fall 2000 Pilsner California $609,354
Fall 2000 Porter California $501,393
Fall 2000 Stout California $461,281
Fall 2000 Amber Ale Oregon $476,654
Fall 2000 Hefeweizen Oregon $405,717
Fall 2000 Pale Ale Oregon $407,780
Fall 2000 Pilsner Oregon $462,903
Fall 2000 Porter Oregon $460,030
Fall 2000 Stout Oregon $463,982
Fall 2000 Amber Ale Washington $622,573
Fall 2000 Hefeweizen Washington $578,387
Fall 2000 Pale Ale Washington $579,998
Fall 2000 Pilsner Washington $594,253
Fall 2000 Porter Washington $473,198
Fall 2000 Stout Washington $601,406
Spring 2000 Amber Ale California $616,561
Spring 2000 Hefeweizen California $559,403
Spring 2000 Pale Ale California $597,369
Spring 2000 Pilsner California $709,122
Spring 2000 Porter California $462,316
Spring 2000 Stout California $466,554
Spring 2000 Amber Ale Oregon $380,338
Spring 2000 Hefeweizen Oregon $406,420
Spring 2000 Pale Ale Oregon $422,373
Spring 2000 Pilsner Oregon $385,923
Spring 2000 Porter Oregon $474,148
Spring 2000 Stout Oregon $438,409
Spring 2000 Amber Ale Washington $554,317
Spring 2000 Hefeweizen Washington $609,069
Spring 2000 Pale Ale Washington $563,406
Spring 2000 Pilsner Washington $606,490
Spring 2000 Porter Washington $564,560
Spring 2000 Stout Washington $600,194
Summer 2000 Amber Ale California $549,802
Summer 2000 Hefeweizen California $493,119
Summer 2000 Pale Ale California $576,355
Summer 2000 Pilsner California $670,233
Summer 2000 Porter California $524,001
Summer 2000 Stout California $527,703
Summer 2000 Amber Ale Oregon $355,197
Summer 2000 Hefeweizen Oregon $420,947
Summer 2000 Pale Ale Oregon $423,393
Summer 2000 Pilsner Oregon $547,726
Summer 2000 Porter Oregon $478,507
Summer 2000 Stout Oregon $425,549
Summer 2000 Amber Ale Washington $618,631
Summer 2000 Hefeweizen Washington $593,074
Summer 2000 Pale Ale Washington $708,115
Summer 2000 Pilsner Washington $657,230
Summer 2000 Porter Washington $636,020
Summer 2000 Stout Washington $648,918
Winter 2000 Amber Ale California $508,848
Winter 2000 Hefeweizen California $522,433
Winter 2000 Pale Ale California $526,729
Winter 2000 Pilsner California $504,010
Winter 2000 Porter California $426,401
Winter 2000 Stout California $430,903
Winter 2000 Amber Ale Oregon $319,614
Winter 2000 Hefeweizen Oregon $417,155
Winter 2000 Pale Ale Oregon $395,381
Winter 2000 Pilsner Oregon $385,921
Winter 2000 Porter Oregon $349,157
Winter 2000 Stout Oregon $375,737
Winter 2000 Amber Ale Washington $528,322
Winter 2000 Hefeweizen Washington $497,798
Winter 2000 Pale Ale Washington $515,122
Winter 2000 Pilsner Washington $501,404
Winter 2000 Porter Washington $518,350
Winter 2000 Stout Washington $445,582

You might also like