LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Arrays

Hi,
I am trying to produce a sixteen element array from cells in a 4 by 4
section eg (A1:D4) of a larger 16 by 16 grid eg (A1:P16)
If I write

Dim rng1 As Range, rng2 As Range, rng3 As Range
Dim xxx As Variant, yyy As Variant, zzz As Variant

With Worksheets("Sheet1")
Set rng1 = .Range("A1:P1")
Set rng2 = .Range("A1:A16")
Set rng3 = .Range("A1:D1, A2:D2, A3:D3, A4:D4")
End With
xxx = rng1.Value
yyy = rng2.Value
zzz = rng3.Value

then both xxx and yyy produce 16 element arrays. However, zzz produces
only a 4 element array ie the first row.
I can confirm that rng3 describes 16 cells by adding rng3.Select to the
code. The correct area is highlighted.
What else do I have to add to the code?
Thanks in advance,
Ken Rock
 
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
Avg Arrays PAL Excel Worksheet Functions 2 February 13th 09 06:02 PM
Arrays Abdul Shakeel Excel Worksheet Functions 1 December 12th 08 10:24 AM
Regarding Arrays Raj Excel Discussion (Misc queries) 5 December 10th 08 03:51 PM
Regarding the Arrays Raj Excel Discussion (Misc queries) 1 December 10th 08 02:26 PM
arrays in arrays jacob Excel Programming 4 August 29th 04 08:40 PM


All times are GMT +1. The time now is 08:26 AM.

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"