Sei sulla pagina 1di 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. 2 4 6 8 10 12 14 16 18 20 22 24

Use the SQRT function on a 5-value array constant. 1.0000 1.4142 1.7321 2.0000 2.2361

Use the SQRT function on a range of 5 values. 1 2 3 4 5 -the range 1.0000 1.4142 1.7321 2.0000 2.2361 -the result

Example: Using an array formula to eliminate intermediate formulas


Product Widgets Ridgets Lidgets Kidgets Fidgets Zidgets Units Sold Unit Price Normal Calcs 3 $50 $150 10 $100 $1,000 5 $20 $100 9 $10 $90 3 $60 $180 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 Smith Jones Wicket Pickford Aguila Fortes Jordan Michard Smith Willard Ellis Smith Pickford Smith Sale $880 $350 $441 $280 $385 $281 $300 $250 $201 $398 $440 $595 $560 $220 Excel built-in function: The SumIF method $ 1,896

The array formula method $ 1,896

Another method: A Pivot Table Sum of Sale Name Total 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 NA 161,000 198,200 Motors Europe NA Acoustics Europe NA Studio Europe NA

160,700 190,100

35,000 60,000 Add this new data into the mix. The array formula handles it. The average function doesn't.

153,900 190,700 Array formula 158,533 193,000 Using the AVERAGE Function 158,533 193,000

Average Europe Average NA

both 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: 2 18 4 5 25 15 7 99 23 6 14 28 0 6 13 7 4 8

-3

Note:

The syntax of the SMALL function is =SMALL(array,k) The formula uses an array constant as the 2
nd

is a range of numerical data for which you want to fin

argument

This generates a new array that consists of the three This array is then passed to the SUM function, and it r in the new array; in this example, -3. This is the proc

Step 1. Excel evaluates the SMALL function using a seco

Step 2. Excel evaluates the SMALL function using a seco Step 4. Excel sums together 5, 0, and 2 and returns 3.

Step 3. Excel evaluates the SMALL function using a seco

LL function is =SMALL(array,k) where array


nd

l data for which you want to find the kth smallest value.

ray constant as the 2

argument for the SMALL function.

array that consists of the three smallest values in the range. ed to the SUM function, and it returns the sum of the values is example, -3. This is the processing Excel goes through:

the SMALL function using a second argument of 1. It returns 5.

the SMALL function using a second argument of 2. It returns 0.

the SMALL function using a second argument of 3. It returns 2.

ther 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: California, Pale Ale: Washington, Porter:

$4,758,779 $6,684,042 $4,939,958

Season Fall Fall Fall Fall Fall Fall Fall Fall Fall Fall Fall Fall Fall Fall Fall Fall Fall Fall Spring Spring Spring Spring Spring Spring Spring Spring Spring Spring Spring Spring Spring Spring Spring Spring Spring Spring Summer Summer

Year 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998

Type Amber Ale Hefeweizen Pale Ale Pilsner Porter Stout Amber Ale Hefeweizen Pale Ale Pilsner Porter Stout Amber Ale Hefeweizen Pale Ale Pilsner Porter Stout Amber Ale Hefeweizen Pale Ale Pilsner Porter Stout Amber Ale Hefeweizen Pale Ale Pilsner Porter Stout Amber Ale Hefeweizen Pale Ale Pilsner Porter Stout Amber Ale Hefeweizen

State California California California California California California Oregon Oregon Oregon Oregon Oregon Oregon Washington Washington Washington Washington Washington Washington California California California California California California Oregon Oregon Oregon Oregon Oregon Oregon Washington Washington Washington Washington Washington Washington California California

Sales $ $554,536 $540,643 $577,548 $455,905 $490,871 $446,383 $457,726 $347,696 $384,541 $386,420 $370,970 $430,754 $500,847 $507,070 $482,346 $608,713 $150,000 $500,649 $545,780 $440,644 $580,359 $536,225 $414,908 $377,997 $331,289 $384,572 $365,813 $396,338 $453,761 $356,538 $606,332 $535,218 $493,364 $559,100 $220,350 $476,975 $545,621 $489,255

Summer Summer Summer Summer Summer Summer Summer Summer Summer Summer Summer Summer Summer Summer Summer Summer Winter Winter Winter Winter Winter Winter Winter Winter Winter Winter Winter Winter Winter Winter Winter Winter Winter Winter Fall Fall Fall Fall Fall Fall Fall Fall Fall Fall Fall Fall Fall Fall Fall

1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1998 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999

Pale Ale Pilsner Porter Stout Amber Ale Hefeweizen Pale Ale Pilsner Porter Stout Amber Ale Hefeweizen Pale Ale Pilsner Porter Stout Amber Ale Hefeweizen Pale Ale Pilsner Porter Stout Amber Ale Hefeweizen Pale Ale Pilsner Porter Stout Amber Ale Hefeweizen Pale Ale Pilsner Porter Stout Amber Ale Hefeweizen Pale Ale Pilsner Porter Stout Amber Ale Hefeweizen Pale Ale Pilsner Porter Stout Amber Ale Hefeweizen Pale Ale

California California California California Oregon Oregon Oregon Oregon Oregon Oregon Washington Washington Washington Washington Washington Washington California California California California California California Oregon Oregon Oregon Oregon Oregon Oregon Washington Washington Washington Washington Washington Washington California California California California California California Oregon Oregon Oregon Oregon Oregon Oregon Washington Washington Washington

$523,124 $612,216 $425,562 $485,285 $467,173 $447,637 $407,542 $449,575 $403,248 $449,293 $493,845 $523,464 $575,692 $568,633 $100,250 $487,012 $519,177 $488,597 $456,653 $528,843 $420,782 $439,751 $348,503 $352,086 $336,824 $350,924 $338,334 $383,738 $508,939 $393,294 $430,380 $390,741 $118,030 $522,282 $514,649 $498,673 $541,930 $541,022 $487,516 $558,787 $393,690 $427,784 $386,772 $430,461 $481,311 $529,637 $596,707 $541,275 $574,091

Fall Fall Fall Spring Spring Spring Spring Spring Spring Spring Spring Spring Spring Spring Spring Spring Spring Spring Spring Spring Spring Summer Summer Summer Summer Summer Summer Summer Summer Summer Summer Summer Summer Summer Summer Summer Summer Summer Summer Winter Winter Winter Winter Winter Winter Winter Winter Winter Winter

1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999 1999

Pilsner Porter Stout Amber Ale Hefeweizen Pale Ale Pilsner Porter Stout Amber Ale Hefeweizen Pale Ale Pilsner Porter Stout Amber Ale Hefeweizen Pale Ale Pilsner Porter Stout Amber Ale Hefeweizen Pale Ale Pilsner Porter Stout Amber Ale Hefeweizen Pale Ale Pilsner Porter Stout Amber Ale Hefeweizen Pale Ale Pilsner Porter Stout Amber Ale Hefeweizen Pale Ale Pilsner Porter Stout Amber Ale Hefeweizen Pale Ale Pilsner

Washington Washington Washington California California California California California California Oregon Oregon Oregon Oregon Oregon Oregon Washington Washington Washington Washington Washington Washington California California California California California California Oregon Oregon Oregon Oregon Oregon Oregon Washington Washington Washington Washington Washington Washington California California California California California California Oregon Oregon Oregon Oregon

$567,246 $530,193 $475,884 $533,691 $534,352 $588,845 $513,750 $516,692 $539,883 $418,483 $452,955 $432,909 $493,853 $393,368 $405,946 $561,874 $544,747 $470,339 $530,410 $455,378 $668,180 $597,626 $612,909 $585,669 $641,282 $447,013 $476,238 $421,466 $427,983 $429,498 $544,597 $446,014 $487,611 $565,106 $567,487 $538,648 $708,608 $634,104 $522,179 $511,406 $487,020 $563,504 $565,428 $380,743 $351,971 $388,646 $337,401 $441,713 $438,764

Winter Winter Winter Winter Winter Winter Winter Winter Fall Fall Fall Fall Fall Fall Fall Fall Fall Fall Fall Fall Fall Fall Fall Fall Fall Fall Spring Spring Spring Spring Spring Spring Spring Spring Spring Spring Spring Spring Spring Spring Spring Spring Spring Spring Summer Summer Summer Summer Summer

1999 1999 1999 1999 1999 1999 1999 1999 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000

Porter Stout Amber Ale Hefeweizen Pale Ale Pilsner Porter Stout Amber Ale Hefeweizen Pale Ale Pilsner Porter Stout Amber Ale Hefeweizen Pale Ale Pilsner Porter Stout Amber Ale Hefeweizen Pale Ale Pilsner Porter Stout Amber Ale Hefeweizen Pale Ale Pilsner Porter Stout Amber Ale Hefeweizen Pale Ale Pilsner Porter Stout Amber Ale Hefeweizen Pale Ale Pilsner Porter Stout Amber Ale Hefeweizen Pale Ale Pilsner Porter

Oregon Oregon Washington Washington Washington Washington Washington Washington California California California California California California Oregon Oregon Oregon Oregon Oregon Oregon Washington Washington Washington Washington Washington Washington California California California California California California Oregon Oregon Oregon Oregon Oregon Oregon Washington Washington Washington Washington Washington Washington California California California California California

$378,201 $413,519 $516,512 $494,282 $538,958 $502,214 $539,525 $517,806 $625,097 $632,542 $565,957 $609,354 $501,393 $461,281 $476,654 $405,717 $407,780 $462,903 $460,030 $463,982 $622,573 $578,387 $579,998 $594,253 $473,198 $601,406 $616,561 $559,403 $597,369 $709,122 $462,316 $466,554 $380,338 $406,420 $422,373 $385,923 $474,148 $438,409 $554,317 $609,069 $563,406 $606,490 $564,560 $600,194 $549,802 $493,119 $576,355 $670,233 $524,001

Summer Summer Summer Summer Summer Summer Summer Summer Summer Summer Summer Summer Summer Winter Winter Winter Winter Winter Winter Winter Winter Winter Winter Winter Winter Winter Winter Winter Winter Winter Winter

2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000

Stout Amber Ale Hefeweizen Pale Ale Pilsner Porter Stout Amber Ale Hefeweizen Pale Ale Pilsner Porter Stout Amber Ale Hefeweizen Pale Ale Pilsner Porter Stout Amber Ale Hefeweizen Pale Ale Pilsner Porter Stout Amber Ale Hefeweizen Pale Ale Pilsner Porter Stout

California Oregon Oregon Oregon Oregon Oregon Oregon Washington Washington Washington Washington Washington Washington California California California California California California Oregon Oregon Oregon Oregon Oregon Oregon Washington Washington Washington Washington Washington Washington

$527,703 $355,197 $420,947 $423,393 $547,726 $478,507 $425,549 $618,631 $593,074 $708,115 $657,230 $636,020 $648,918 $508,848 $522,433 $526,729 $504,010 $426,401 $430,903 $319,614 $417,155 $395,381 $385,921 $349,157 $375,737 $528,322 $497,798 $515,122 $501,404 $518,350 $445,582

Potrebbero piacerti anche