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

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
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,224,825
Messages
6,181,191
Members
453,021
Latest member
pingpong7117

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