How to input a column(50x1) of a stored array(50x50) as an input to a function??

Punar

New Member
Joined
Jul 10, 2012
Messages
8
I have an array of 50x50 size. The array is stored and is not displayed anywhere on the spreadsheet. I need to give the columns(50x1) one by one as input to a function. What is the quickest way of doing this using VBA?
Please help me!
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
I need to give the columns(50x1) one by one as input to a function.
I don't fully understand what you are after, but I will hazard a guess that you need the Index function. You can use Index to pull specific columns of your 50 row array. E.g:

TempArray = Application.Index(VarArray,0,3)

The 0 will ensures that all 50 rows are returned. The 3 captures only the 3rd column.
 
Upvote 0
I don't fully understand what you are after, but I will hazard a guess that you need the Index function. You can use Index to pull specific columns of your 50 row array. E.g:

TempArray = Application.Index(VarArray,0,3)

The 0 will ensures that all 50 rows are returned. The 3 captures only the 3rd column.

Thank you so much Jon!!
That was exactly what I needed! :)
 
Upvote 0

Forum statistics

Threads
1,224,607
Messages
6,179,871
Members
452,948
Latest member
UsmanAli786

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