Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default range values in an array?

Is ther an easy way to read the values of multiple cells into an array?

myArray = Range(LeftCell, RightCell) <-?

Thanks
Mike
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default range values in an array?

myArray = Range("A1:Z1")

Or do you mean something else?

--
Kind regards,

Niek Otten

"Mike" wrote in message
...
Is ther an easy way to read the values of multiple cells into an array?

myArray = Range(LeftCell, RightCell) <-?

Thanks
Mike



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default range values in an array?

I am wanting to put the values from each cell in a range into an array.

Thanks
MIke

"Niek Otten" wrote:

myArray = Range("A1:Z1")

Or do you mean something else?

--
Kind regards,

Niek Otten

"Mike" wrote in message
...
Is ther an easy way to read the values of multiple cells into an array?

myArray = Range(LeftCell, RightCell) <-?

Thanks
Mike




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default range values in an array?

Mike,
Further to Niek's reply (as an illustration):

Sub test()
Dim myArray As Variant
myArray = Range("a1:b20")
For r = 1 To UBound(myArray, 1)
For c = 1 To UBound(myArray, 2)
Debug.Print myArray(r, c)
Next
Next
End Sub


HTH

"Mike" wrote:

I am wanting to put the values from each cell in a range into an array.

Thanks
MIke

"Niek Otten" wrote:

myArray = Range("A1:Z1")

Or do you mean something else?

--
Kind regards,

Niek Otten

"Mike" wrote in message
...
Is ther an easy way to read the values of multiple cells into an array?

myArray = Range(LeftCell, RightCell) <-?

Thanks
Mike




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
Getting values from a variable sized range into an array Ken Loomis Excel Programming 8 October 5th 04 09:04 AM
Array of Values from Worksheet Range - What does it 'look' like? Alan Excel Programming 7 July 8th 04 01:06 PM
efficiently copy values from a Range of cells to an array (in VB.N JW Excel Programming 0 June 22nd 04 11:17 AM
efficiently copy values from a Range of cells to an array (in VB.N JW Excel Programming 0 June 22nd 04 11:15 AM
Create Array From Values in range Tony Di Stasi[_2_] Excel Programming 2 February 27th 04 09:40 PM


All times are GMT +1. The time now is 02:41 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"