How do I create an array?

JCScoobyRS

Board Regular
Joined
Sep 17, 2002
Messages
102
I have the need to create an array for value between A62 and A2136. I need some help as I have never done this before. Any ideas? Thanks, Jeremy
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Hi,

I am not sure I fully understand your request.<pre>Dim x
x = Range("A62:A2136").Value</pre>

will write the range into a two-dimensional array

x(rows,columns) = x(rows,1) here.

_________________
Bye,
Jay

EDIT: For a one dimensional array you can use<pre>x = WorksheetFunction.Transpose(Range("A62:A2136"))</pre>

If the data is in a row rather than a column, do not do the transpose. Multiple rows *and* columns likely need the first method above.
This message was edited by Jay Petrulis on 2002-09-27 16:47
 
Upvote 0
Hi JCScoobyRS:

Jay may have really answered your question. I just wanted to show via the following simulation on how data in cells A62:A67 can be written as an array
y020927.xls
ABCDEF
56
57sourcedata
58writtenasanarray
59arrayexpanded(withCTRL+ENTER)
60
61
62333
6322
6455
6577
6611
6766
Sheet7
</SPAN>

Regards!

Yogi
This message was edited by Yogi Anand on 2002-09-27 20:38
 
Upvote 0

Forum statistics

Threads
1,214,944
Messages
6,122,387
Members
449,080
Latest member
Armadillos

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