Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default How Do You Take Data Off A Sheet and Store It In An Array

What is a good method of taking data out of an column and then storing that
data in to an array until it reaches the end of the column.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default How Do You Take Data Off A Sheet and Store It In An Array

Hi,

Will this do?

Dim arr As Variant

arr = Range("a1:a" & Cells(Rows.Count, 1).End(xlUp).Row)

For i = 1 To UBound(arr, 1)
Debug.Print arr(i, 1)
Next i

Range("a1:a" & Cells(Rows.Count, 1).End(xlUp).Row)=arr



"Raleigh" wrote:

What is a good method of taking data out of an column and then storing that
data in to an array until it reaches the end of the column.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How Do You Take Data Off A Sheet and Store It In An Array

Dim rng as Range, v as Variant
set rng = Range(Range("B1"),Range("B1").end(xldown))
v = rng.Value
now v is a 2D array

v(1 to #rows,1 to 1)

--
Regards,
Tom Ogilvy

"Raleigh" wrote in message
...
What is a good method of taking data out of an column and then storing

that
data in to an array until it reaches the end of the column.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
invoice on sheet 1 & data store on sheet 2 automatically Sudipta Sen[_2_] Excel Discussion (Misc queries) 2 November 25th 09 01:38 PM
Store array ??? piero Excel Worksheet Functions 4 September 16th 09 04:39 PM
Can one store a string in a Array element? [email protected] Excel Discussion (Misc queries) 1 April 17th 07 12:53 PM
store inventory sheet(ex:sports equipment store) vardan Excel Worksheet Functions 1 October 11th 06 12:51 AM
Lookup and store in array kanuvas[_7_] Excel Programming 1 November 9th 05 10:43 AM


All times are GMT +1. The time now is 11:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"