Sie sind auf Seite 1von 20

INDEX FUNCTION (SYNTAX #1 - RETURNING A VALUE)

Index Array Form Syntax

The INDEX function must have three parameters:


References of a range of cell containing the value to return
The row index
The column index

Syntax: INDEX( array, row_num, [column_num])

"The order of parameters is very important. Often, users reverse the setting of the row a
return the correct result."
array - is a range of cells, named range, or table.

row_num - is the row number in the array from which to return a value. If row_num is omitted, column

column_num - is the column number from which to return a va

Points to Note:
If the selected array contains only one row or column, the corresponding row_num or column_num argument is opt
If the selected array contains more than one row and column, and you have entered either row_num or column_num
respectively.

If both the row_num and column_num arguments are used, Excel returns the value in the cell at the intersection po

Practice #1

Compute the Distance between Cities


Col 1
Boston

Row 1
Row 2
Row 3
Row 4
Row 5
Row 6
Row 7
Row 8

Boston
Chicago
Dallas
Denver
LA
Miami
Phoenix
Seattle

Seattle- Miami
Boston-Denver
Phoenix to Miami

0
983
1815
1991
3036
1539
2664
2612

Col 2
Chicago
983
0
1205
1050
2112
1390
1729
2052

3389
1991
2359

Computation of Total Distance to Seattle fr

Practice #2

Boston to Seattle
Chicago to Seattle
Dallas to Seattle
Denver to Seattle
LA to Seattle
Miami to Seattle
Phoenix to Seattle
Seattle to Seattle

2612
2052
2404
1373
1909
3389
1482
0

Total Distance

Computation of Round trip Distance from S

Practice #3

Computation of road trip from Seattle to Phoenix, Los Angeles, Denver, Dallas, and Chicago and back to
Seattle.
Round Trip
City
Seattle
Phoenix
LA
Denver
Dallas
Chicago
Seattle

8
7
5
4
3
2
0
Total

Row 1
Row 2
Row 3
Row 4
Row 5
Row 6
Row 7
Row 8

Boston
Chicago
Dallas
Denver
LA
Miami
Phoenix
Seattle

Distance
1482
1482
398
1880
1174
3054
801
3855
1205
5060
983
15581
0
6043
Col 1
Col 2
Col 3
Boston
Chicago
Dallas
0
983
1815
983
0
1205
1815
1205
0
1991
1050
801
3036
2112
1425
1539
1390
1332
2664
1729
1027
2612
2052
2404

rse the setting of the row andthe column and inevitably, the function does not

lue. If row_num is omitted, column_num is required.


number from which to return a value. If column_num is omitted, row_num is required.

um or column_num argument is optional.


ered either row_num or column_num argument, then Excel returns an array of the entire row or column,

alue in the cell at the intersection point of the specified row and column number.

nce between Cities


Col 3
Col 4
Col 5
Col 6
Col 7
Dallas
Denver
LA
Miami
Phoenix
Seattle
1815
1991
3036
1539
2664
1205
1050
2112
1390
1729
0
801
1425
1332
1027
801
0
1174
2100
836
1425
1174
0
2757
398
1332
2100
2757
0
2359
1027
836
398
2359
0
2404
1373
1909
3389
1482

Col 8
2612
2052
2404
1373
1909
3389
1482
0

al Distance to Seattle from all Places


Total Distance to Seattle

15221
15221

15221

Computation of Total Distance from dallas to all Places


10009

10009

und trip Distance from Seattle

Chicago and back to

Computation of road trip from Dallas, that takes to Chicago, Denver, Los Angeles,
Phoenix, and Seattle.
Round Trip
City
Dallas
Chicago
Denver
LA
Phoenix
Seattle

Distance
3
2
4
5
7
8

1205
1050
1174
398
1482
0
5309

Col 4
Col 5
Col 6
Col 7
Col 8
Denver
LA
Miami
Phoenix
Seattle
1991
3036
1539
2664
2612
1050
2112
1390
1729
2052
801
1425
1332
1027
2404
0
1174
2100
836
1373
1174
0
2757
398
1909
2100
2757
0
2359
3389
836
398
2359
0
1482
1373
1909
3389
1482
0

Illustration
Column 1

Column 2

Row 1

Course

Weightage

Row 2
Row 3
Row 4

Literature
Poetry
Mathematics

Row 5
Row 6

Geography
Business Communications

Row 7
Row 8

International Relations
Political Science

10%
10%
15%
10%
20%
20%
15%

enver, Los Angeles,

lustration
Formula

Resulting Value

Find Contents of Row 2 and Column 1


=INDEX(N11:O18,2,1)

Literature

Display the Contents of 4th Row and 1st Column


15%
=INDEX(N11:O18,4,2)
Find the Contents in of Row four and Column 1
=INDEX(N11:N18,4)
Mathematics

Row 2
Mathematics

0.15

INDEX FUNCTION (SYNTAX #2 - RETURNING A REFERENCE TO A VALUE)


Reference Array Form Syntax

The INDEX function must have Four parameters:


References of a range of cell containing the value to return
The row index
The column index
[Optional] zone number (in case of multi-tables)

Syntax: INDEX(reference, row_num, [column_num], [area_num] )

reference - is one or several ranges. If more than one range entered, separate the ranges by comma
row_num - the row number in the range from which to return a cell reference, it's similar to

column_num - the column number from which to return a cell reference, also w

area_num - an optional parameter that specifies which range fro


the result for the first range listed in reference

If the row_num or column_num argument is set to zero (0), an Excel INDEX formula returns the reference for t

If both row_num and column_num are omitted, the INDEX function returns the area specified in the area_num

All of the num arguments (row_num, column_num and area_num) must refer to a cell within referen

Common Errors
Err:512

Err:512

Occurs if either:
The suppliedrow_numargument is greater than the number of rows in the su

The supplied[col_num]argument is greater than the number of columns in t


the supplied[area_num]argument is greater than the number of areas in the
Occurs if any of the suppliedrow_num,[col_num]or[area_num]arguments a

Pratice #1
Product
Apples
Bananas
Oranges
Pears

Fruits
Price

Weight
1.99
0.89
0.99
2.99

Product
30
20
50
15

Almonds
Cashews
Peanuts
Walnuts

Nuts
Price
9.99
7.49
3.99
9.99

Example 1:
Find the Price of Bananas
0.89
0.89
Example 2:
No Value
Err:502
0
Example 3:
Column beyond Reference (Ref Error)
Err:502
Err:502
Example 4:
Reference Array
Err:502
Example 5
Value Error
#VALUE!
Example 6: =SUM(INDEX(Nuts,0,3))
returns
100, which is the sum of the range G3:G8.
Sum of Values in Area
2
100
100
131.46
Practice #2
Area 1
Col 1
Col 2
Row 1
4
6
Row 2
Row 1
5
3
Row 3
Row 2
6
9
Row 4
Row 3
7
5
Row 5
8
3
Area 2
Col 2
Col 1
Row 1
4
6
Row 2
5
7

Example 1:

Use Reference Array formula to get Value in the Fourth Row


Second Column of Area 1

Example 2
Use Index Formula to get the value in 3rd row, 1st Column in Area 3
Example 3

Sum of all Numbers in the third row of Area 3


Supplied Value of Column Number is Zero

Practice #3

Using Index Formula With other Functions

Planet
Mercury
Venus
Earth
Mars
Jupiter
Saturn
Uranus
Neptune
Pluto

Mass
(Earth=1)
0.060
0.820
1.000
0.110
318.000
95.000
15.000
17.000
0.002

Diameter
(KM)
4,878
12,104
12,755
6,790
142,796
120,660
51,118
49,528
2,300

Temperature
(Deg F)
468
869
59
-9.4
-238
-292
-391
-391
-364

Force of Gravity
(Earth=1)
0.38
0.90
1.00
0.39
2.53
1.06
0.93
1.18
0.07

CE TO A VALUE)

area_num] )

te the ranges by commas and enclose the reference argument in parentheses


reference, it's similar to the array form.

urn a cell reference, also works similarly to the array form - Optional

specifies which range from the reference argument to use. If omitted, the INDEX formula will return
ference

eturns the reference for the entire column or row, respectively.

specified in the area_num argument.

to a cell within reference; otherwise, the INDEX formula will return the #REF! error.

mber of rows in the suppliedrange;

umber of columns in the suppliedrange;


umber of areas in the suppliedrange.
ea_num]arguments are not numeric values.

Nuts
Weight
10
30
20
40

=INDEX((Range1,Range2),Rawno,colno,tableno

Almonds

115

215

Area 3
Col 2

Col 1
5
4
7

Col 3
6
3
1

1
5
2

7
7
10

10

Create Range Name (B75:F83 as SourceData

Convert the Range to Table


1. Getting the Nth item from the list
Get the Poistion of Earth

Err:508

Sot on Diameter
Second Larget Planet

Err:508

2. Getting All Values in a Row or Comun


Using SUM (Diameter)
Using Average (Temperature)
Using Max (Diameter)

Err:508
Err:508
Err:508

Using Min (Diameter)


Using Large (Temperature)
Using Small (Mass)

Err:508
Err:508
Err:508

Area 1
Col 2

Col 1

Area 2
Col3

Col 4
Col 1
Unit Cost

Col 5
Col 2
Total Cost

Row 1
Row 2

Order ID
Quantity
10567

3.50 $

7.00

Row 3
Row 4

10568
10569

4
3

$
$

5.00 $
7.23 $

20.00
21.69

Row 5

10570

12

2.99 $

35.88

3.5 $
4

3.50

4
35.88

,Rawno,colno,tableno)

4
4
20

=INDEX(O3:S7,2,4)

Index Array

=INDEX((O4:P8,R4:S8),3,2)
If Area Not Specified, Default Area 1
=INDEX((O4:Q8,R4:S8),3,2,1)
=INDEX((O4:Q8,R4:S8),3,2,2)

Index Reference

dex Reference

Das könnte Ihnen auch gefallen