Define an array for use in an INDEX function using the contents of a cell

ShepDubVegas

New Member
Joined
Aug 1, 2017
Messages
4
I have a number of defined arrays in a workbook and would like to refer to them depending on contents of a cell.

e.g. I have 4 different arrays defined as Array1, Array2, Array3 and Array4. Cell A2 contains a formula that will return a value corresponding to the name of one of those arrays (ie Array1, Array2, Array3 or Array4). I then have a formula in another cell (Say B2) that wants to use that value to look up the correct array, e.g. INDEX(A2,.....), where rather than A2 as the array, it is the value in A2 that is used to define the array.

Hope this makes sense and someone can help! Many thanks in advance.
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
if your defined arrays are range names then you need to use the indirect function
Code:
=INDEX(INDIRECT(A2),MATCH(....))
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top