# Index Worksheet Function

#### gnaga

##### Well-known Member
Hi,

I am using Index Function in arrray formula.My formula is as follows

{=Index(A1:D3,A4)}

A4 is housing a number 2

I am entering this formula in the range of
E1:E4

It suppose to return the value of A2:D2 asper excel doumentation. But it is repeating the value of A2 in all the cells in the range of E1:E4.

If my understanding is right then why it is not returning the value? Otherwise what is it I am missing?

GNaga

### Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
In E1 enter & copy down as far as needed:

=INDEX(\$A\$1:\$D\$3,\$A\$4,ROW(1:1))

Aladin Can you please explain what is the wrong in my formula? Asper excel help documentation if we omit column number it suppose to return the entire row.

When I omit the row number the entire column values are returned in the target range.

Thank you

GNaga

On 2002-09-29 06:59, gnaga wrote:
Aladin Can you please explain what is the wrong in my formula? Asper excel help documentation if we omit column number it suppose to return the entire row.

When I omit the row number the entire column values are returned in the target range.

Thank you

GNaga

If you insist on an array-entered version, then you need to set up the formula as either

=INDEX(A1:D3,A4,)

or

=INDEX(A1:D3,A4,0)

and array-enter it in a 4-cell horizontal range.

If you insist having 4 values in row 2 of the original set in a vertical range, you need set up the formula as:

=TRANSPOSE(INDEX(A1:D3,A4,0))

and array-enter in a 4-cell vertical range.

What all this boils down to is that you need to transpose when you want to go from a horizontal to a vertical range (or vice versa).

Note that what I proposed in my initial reply is not an array formula.

EDIT for typo...
This message was edited by Aladin Akyurek on 2002-09-29 07:54

Replies
13
Views
995
Replies
3
Views
325
Replies
1
Views
264
Replies
6
Views
277
Replies
2
Views
191

1,218,575
Messages
6,143,313
Members
450,477
Latest member
teresab543

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back