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:)
Calling Array Elements in Excel
-
- StarLounger
- Posts: 61
- Joined: 29 Jul 2010, 14:52
Calling Array Elements in Excel
I don't have one
-
- Administrator
- Posts: 78623
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Calling Array Elements in Excel
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).
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
Hans
-
- StarLounger
- Posts: 61
- Joined: 29 Jul 2010, 14:52
Re: Calling Array Elements in Excel
Wow. Thank you again HansV!
Such simple questions I ask but fundamental for me
Such simple questions I ask but fundamental for me
I don't have one