View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
qpg qpg is offline
external usenet poster
 
Posts: 11
Default Selection to Array and Array to Sheet

I guess I did not explain myself quite right. What I am trying to do is
take a 2 dimensional array and expand it like the example below, and
then write it out on a different part of the sheet. Basically I need a
list that is all the permutations of the original value pairs.

Original selected array
ColA, ColB
1, 111
2, 222
3, 333



New Array would be this:
ColA, CalB
1, 111
2, 111
3, 111
2, 111
2, 222
2, 333
3,111
3, 222
3, 333

Any additional help would be great. Thanks.

Alan Beban wrote:
qpg wrote:
I am looking for and example of how to create a multidimential array (2
dimientions) from a selection and then how to write that array data
(with some modifications) to another location on the same sheet.

any help would be appreciated.

Thank you


Range("C3:E5").Select
arr = Selection
'do whatever
Range("G1:I3").Value = arr

I don't know why you're selecting. You get the same result with

arr=Range("C3:E5")
'do whatever
Range("G1:I3").Value = arr

Alan Beban