Download as xls, pdf, or txt
Download as xls, pdf, or txt
You are on page 1of 10

Using array formulas and array constants

An array formula can perform multiple calculations and then return either a single result or multiple results.
Array constants can be used in place of references when you don't want to enter each constant value in a

Using an array formula to calculate single and multiple results


When you enter an array formula (array formula: A formula that performs multiple calculations on one or more sets of values, an
To calculate a single result This type of array formula can simplify a worksheet model by replacing seve
For example, the following calculates the total value of an array of stock prices and shares, without using a

Array formula that produces a single result

When you enter the formula ={SUM(B2:D2*B3:D3)} as an array formula, it multiples the Shares and Price for each stock, and then adds the results of those calculations together.

To calculate multiple results Some worksheet functions return arrays of values, or require an array of v
For example, given a series of three sales figures (in column B) for a series of three months (in column A),

Array formula that produces multiple results

When you enter the formula =TREND(B1:B3,A1:A3) as an array formula, it produces three separate results (22196, 17079, and 11962), based on the three sales figures and the three months.

Using array constants


In an ordinary formula, you can enter a reference to a cell containing a value, or the value itself, also called a constant (constan
Array constants can contain numbers, text, logical values such as TRUE or FALSE, or error values such a
Array constants cannot contain cell references, columns or rows of unequal length, formulas, or the specia
When you format array constants, make sure you:
Enclose them in braces ( { } ).
Separate values in different columns with commas (,). For example, to represent the values 10, 20, 30, a
Separate values in different rows with semicolons (;). For example, to represent the values 10, 20, 30, an
ult or multiple results. Array formulas act on two or more sets of values known as array arguments. Each array argum
h constant value in a separate cell on the worksheet.

or more sets of values, and then returns either a single result or multiple results. Array formulas are enclosed between braces { } and are en
odel by replacing several different formulas with a single array formula.
hares, without using a row of cells to calculate and display the individual values for each stock.

r require an array of values as an argument. To calculate multiple results with an array formula, you must enter the ar
months (in column A), the TREND function determines the straight-line values for the sales figures. To display all of th

gures and the three months.

called a constant (constant: A value that is not calculated and, therefore, does not change. For example, the number 210, and the text "Qua
or error values such as #N/A. Different types of values can be in the same array constant — for example, {1,3,4;TRUE
ormulas, or the special characters $ (dollar sign), parentheses, or % (percent sign).

e values 10, 20, 30, and 40, enter {10,20,30,40}. This array constant is known as a 1-by-4 array and is equivalent to
e values 10, 20, 30, and 40 in one row and 50, 60, 70, and 80 in the row immediately below, you would enter a 2-by-4
nts. Each array argument must have the same number of rows and columns. You create array formulas in the same

ween braces { } and are entered by pressing CTRL+SHIFT+ENTER.), Microsoft Excel automatically inserts the formula between { } (braces)

you must enter the array into a range of cells that has the same number of rows and columns as the array argument
es. To display all of the results of the formula, it is entered into three cells in column C (C1:C3).

er 210, and the text "Quarterly Earnings" are constants. An expression, or a value resulting from an expression, is not a constant.). Similarly
example, {1,3,4;TRUE,FALSE,TRUE}. Numbers in array constants can be in integer, decimal, or scientific format. Te

y and is equivalent to a 1-row-by-4-column reference.


u would enter a 2-by-4 array constant: {10,20,30,40;50,60,70,80}.
ormulas in the same way that you create other formulas, except you press CTRL+SHIFT+ENTER to enter the formu

mula between { } (braces).

s the array arguments.

not a constant.). Similarly, in an array formula you can enter a reference to an array, or enter the array of values contained within the cells,
r scientific format. Text must be enclosed in double quotation marks — for example, "Tuesday".
ER to enter the formula. Some of the built-in functions are array formulas, and must be entered as arrays to get the c

ontained within the cells, also called an array constant. Array formulas accept constants in the same way that nonarray formulas do, but you
as arrays to get the correct results.

array formulas do, but you must enter the array constants in a certain format.
Penjualan Komputer
Produk Unit Harga Satuan
Laptop 200 6,100
Desktop 250 3,500
Server 245 7,000

Total Penjualan 3,810,000


Asset PT A Asset PT B
Laptop Laptop
Printer Desktop
Scanner Server
Meja Meja
Kursi Kursi
Mobil sedan Sepeda motor
Truk Truk

{=SUM(IF((A2:A8)=(B2:B8),1,0))}
4
Nama Jumlah
Tanggal Nama Barang Pramuniaga Penjualan
02-Jan-07 Laptop Ali 2
02-Jan-07 Printer Ahmad 1
03-Jan-07 Scanner Ali 1
04-Jan-07 Laptop Rohim 2
04-Jan-07 Printer Rohim 1
06-Jan-07 Printer Ahmad 3
07-Jan-07 Laptop Ali 1
07-Jan-07 Printer Rohim 1
07-Jan-07 Scanner Ali 2
10-Jan-07 Scanner Ahmad 1

Penjualan laptop Ali 3


Penjualan laptop Ahmad 4
Penjualan LAPTOP per kwartal
Kuantitas Nilai
Kwartal Penjualan Penjualan
Kwartal 1 200 300,000
Kwartal 2 250 375,000
Kwartal 3 245 367,500
Kwartal 4 220 330,000

Kwartal Kwartal 1 Kwartal 2 Kwartal 3 Kwartal 4


Kuantitas
Penjualan 200 250 245 220
Nilai
Penjualan 300,000 375,000 367,500 330,000

You might also like