Turning around data from sheet1 to sheet2 using VBA
<p>I've looked around the internet to find an answer to my problem.
I need to be able to copy data from sheet1 to sheet2 in Excel, however the rows should be turned into columns. </p>

<p>In sheet1 I have Title, Scope and Deadline listed in column A, and in column B the data provided to these headlines.
In sheet2 I want to click on a CommandButton, which gives me Title, Scope and Deadline in A1, B1 and C1 respectively and the data below these headlines. Doing this the code should pick every fourth line in sheet1 when listing the Title in sheet2 and so on.</p>

<p>I have tried a little bit, put can not make it. My thoughts is to use some kind of loop.</p>

<pre><code>Private sub CommandButton1_Click()
    shSource=WorkSheets("Sheet1")
    shDest=WorkSheets("Sheet2")
    LastRow = shSource.Range("A" &amp; Rows.Count).End(xlUp).Row
    For i = 1 To LastRow
        Range("A1").Offset(4, 0).Select
        Selection.Copy
        shDest.Select
        shDest.Range("A1").Select
        If shDest.Range("A1").Offset(1, 0) &lt;&gt; "" Then
            shDest.Range("A1").End(xlDown).Select
        End If
        ActiveCell.Offset(1, 0).Select
        ActiveCell.Paste
    Next i
End Sub
</code></pre>

<p><a href="http://i.stack.imgur.com/HBQMX.jpg" rel="nofollow">Source sheet1</a></p>

<p><a href="http://i.stack.imgur.com/7k3nN.jpg" rel="nofollow">Destination Sheet2</a></p>

<p>I really hope some of you can help me.
Thanks,
Michelle</p>