I have a spreadsheet set up as follows:

                            Student 1                 Student
2              Student 3                     Student 4

question one             1
2                            3                                  4

question two              5
6                            7                                  8

question three           9
10                          11                                12

question four             13
14                         15                                16

I want to copy the values into an array and paste into another
spreadsheet in the following format:

                            Question 1                 Question
2            Question 3                     Question 4

Student 1                  1
5                            9                                 13

Student 2                 2
6                             10                               14

Student 3                 3
7                             11                               15

Student 4                4
8                             12                                16

So far I have the following that does not seem to work

Sheets.Add
Sheets(1).Name "Upload"
LastColumn = ActiveSheet.UsedRange.Columns
(ActiveSheet.UsedRange.Columns.Count).Column
LastRow = ActiveSheet.UsedRange.Rows
(ActiveSheet.UsedRange.Rows.Count).Row


Set Source = Range (Cells(3,10), Cells((LastRow +1),LastColumn))

ReDim Preserve Data(Source.Count)



For Each K In Source
       Data(X)=K.Source
       X = X+1
Next

Sheets(1).Select
Range("B3")

X = 1
Y= 1

For X = 1 To LastColumn

   For Y = 1 to LastRow
          Cells(X, Y).Value = Data(X).Value
           Y = Y+1
   Next Y

Next X

The more I work with it the more confused I am getting. Can someone,
please help.

JD

--~--~---------~--~----~------------~-------~--~----~
----------------------------------------------------------------------------------
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~----------~----~----~----~------~----~------~--~---

Reply via email to