Calling Array Elements in Excel

kpark91
StarLounger
Posts: 61
Joined: 29 Jul 2010, 14:52

Calling Array Elements in Excel

Post by kpark91 »

Hello,

Is there a way to call an array element?

x is an array. {1,2,3,4,5}

Is there a way for me to call it with a formula?
In a cell,

=x(0)
would give me
1

and
=x(1)
would give me 2

Thank YOU:)
I don't have one

User avatar
HansV
Administrator
Posts: 78623
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Calling Array Elements in Excel

Post by HansV »

I assume that x is a defined name.
You can use the INDEX function to retrieve an element of the array:

=INDEX(x,2)

returns the 2nd element of the array (note that the index is 1-based, not 0-based).
Best wishes,
Hans

kpark91
StarLounger
Posts: 61
Joined: 29 Jul 2010, 14:52

Re: Calling Array Elements in Excel

Post by kpark91 »

Wow. Thank you again HansV!

Such simple questions I ask but fundamental for me :smile:
I don't have one